Changeset 9c77fbf for lib/http_client.c
- Timestamp:
- 2012-09-22T12:47:55Z (12 years ago)
- Branches:
- master
- Children:
- 6bef211
- Parents:
- c6fc24a (diff), 11ec078 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
rc6fc24a r9c77fbf 73 73 printf( "About to send HTTP request:\n%s\n", req->request ); 74 74 75 return ( req );75 return req; 76 76 } 77 77 … … 198 198 int evil_server = 0; 199 199 char buffer[2048]; 200 char *end1, *end2; 200 char *end1, *end2, *s; 201 size_t content_length; 201 202 int st; 202 203 … … 481 482 /* Assume that a closed connection means we're finished, this indeed 482 483 breaks with keep-alive connections and faulty connections. */ 483 req->finished = 1;484 /* req->finished = 1; */ 484 485 485 486 cleanup: … … 488 489 else 489 490 closesocket( req->fd ); 491 492 if( ( s = get_rfc822_header( req->reply_headers, "Content-Length", 0 ) ) && 493 sscanf( s, "%zd", &content_length ) == 1 ) 494 { 495 if( content_length < req->body_size ) 496 { 497 req->status_code = -1; 498 g_free( req->status_string ); 499 req->status_string = g_strdup( "Response truncated" ); 500 } 501 } 502 g_free( s ); 490 503 491 504 if( getenv( "BITLBEE_DEBUG" ) && req )
Note: See TracChangeset
for help on using the changeset viewer.