- Timestamp:
- Feb 10, 2010 10:45:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util-test/http_client.c
r3089 r3095 68 68 69 69 while (!thread_quit) { 70 char *pkt = pj_pool_alloc(pool, srv->buf_size);70 char *pkt = (char*)pj_pool_alloc(pool, srv->buf_size); 71 71 pj_ssize_t pkt_len; 72 72 int rc; … … 155 155 send_size += sendsz; 156 156 157 sdata = pj_pool_alloc(pool, sendsz);157 sdata = (char*)pj_pool_alloc(pool, sendsz); 158 158 pj_create_random_string(sdata, sendsz); 159 159 pj_ansi_sprintf(sdata, "\nSegment #%d\n", ++counter); … … 419 419 #endif 420 420 421 pj_http_headers_add_elmt2(¶m.headers, "Accept", 422 "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"); 423 pj_http_headers_add_elmt2(¶m.headers, "Accept-Language", "en-sg"); 424 pj_http_headers_add_elmt2(¶m.headers, "User-Agent", 425 "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)"); 421 pj_http_headers_add_elmt2(¶m.headers, (char*)"Accept", 422 (char*)"image/gif, image/x-xbitmap, image/jpeg, " 423 "image/pjpeg, application/x-ms-application," 424 " application/vnd.ms-xpsdocument, " 425 "application/xaml+xml, " 426 "application/x-ms-xbap, " 427 "application/x-shockwave-flash, " 428 "application/vnd.ms-excel, " 429 "application/vnd.ms-powerpoint, " 430 "application/msword, */*"); 431 pj_http_headers_add_elmt2(¶m.headers, (char*)"Accept-Language", 432 (char*)"en-sg"); 433 pj_http_headers_add_elmt2(¶m.headers, (char*)"User-Agent", 434 (char*)"Mozilla/4.0 (compatible; MSIE 7.0; " 435 "Windows NT 6.0; SLCC1; " 436 ".NET CLR 2.0.50727; " 437 ".NET CLR 3.0.04506)"); 426 438 if (pj_http_req_create(pool, &url, timer_heap, ioqueue, 427 439 ¶m, &hcb, &http_req)) … … 523 535 524 536 pj_http_req_param_default(¶m); 525 pj_strset2(¶m.method, "PUT");526 data = pj_pool_alloc(pool, length);537 pj_strset2(¶m.method, (char*)"PUT"); 538 data = (char*)pj_pool_alloc(pool, length); 527 539 pj_create_random_string(data, length); 528 540 pj_ansi_sprintf(data, "PUT test\n"); … … 613 625 614 626 pj_http_req_param_default(¶m); 615 pj_strset2(¶m.method, "PUT");627 pj_strset2(¶m.method, (char*)"PUT"); 616 628 total_size = 15383; 617 629 send_size = 0; … … 694 706 695 707 pj_http_req_param_default(¶m); 696 pj_strset2(¶m.method, "DELETE");708 pj_strset2(¶m.method, (char*)"DELETE"); 697 709 if (pj_http_req_create(pool, &url, timer_heap, ioqueue, 698 710 ¶m, &hcb, &http_req))
Note: See TracChangeset
for help on using the changeset viewer.