- Timestamp:
- 2012-09-22T11:52:01Z (12 years ago)
- Branches:
- master
- Children:
- d0752e8
- Parents:
- daf544a
- Location:
- lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
rdaf544a r55ccc9a0 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 ) -
lib/http_client.h
rdaf544a r55ccc9a0 59 59 char *reply_body; 60 60 int body_size; /* The number of bytes in reply_body. */ 61 int finished; /*Set to non-0 if the request was completed61 /* int finished; Set to non-0 if the request was completed 62 62 successfully. */ 63 63 int redir_ttl; /* You can set it to 0 if you don't want -
lib/misc.c
rdaf544a r55ccc9a0 730 730 } 731 731 732 char *get_rfc822_header( c har *text,char *header, int len )732 char *get_rfc822_header( const char *text, const char *header, int len ) 733 733 { 734 734 int hlen = strlen( header ), i; 735 c har *ret;735 const char *ret; 736 736 737 737 if( text == NULL ) -
lib/misc.h
rdaf544a r55ccc9a0 68 68 G_MODULE_EXPORT int md5_verify_password( char *password, char *hash ); 69 69 G_MODULE_EXPORT char **split_command_parts( char *command ); 70 G_MODULE_EXPORT char *get_rfc822_header( c har *text,char *header, int len );70 G_MODULE_EXPORT char *get_rfc822_header( const char *text, const char *header, int len ); 71 71 72 72 #endif
Note: See TracChangeset
for help on using the changeset viewer.