Changeset dd7b931
- Timestamp:
- 2013-06-16T00:14:11Z (11 years ago)
- Branches:
- master
- Children:
- ab19567
- Parents:
- 777461b
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
r777461b rdd7b931 536 536 /* A whole URL */ 537 537 url_t *url; 538 char *s ;538 char *s, *version, *headers; 539 539 const char *new_method; 540 540 … … 564 564 return TRUE; 565 565 } 566 headers = s; 566 567 567 568 /* More or less HTTP/1.0 compliant, from my reading of RFC 2616. … … 583 584 new_method = "POST"; 584 585 586 if( ( version = strstr( req->request, " HTTP/" ) ) && 587 ( s = strstr( version, "\r\n" ) ) ) 588 { 589 version ++; 590 version = g_strndup( version, s - version ); 591 } 592 else 593 version = g_strdup( "HTTP/1.0" ); 594 585 595 /* Okay, this isn't fun! We have to rebuild the request... :-( */ 586 new_request = g_strdup_printf( "%s %s HTTP/1.1\r\nHost: %s%s", 587 new_method, url->file, url->host, s ); 596 new_request = g_strdup_printf( "%s %s %s\r\nHost: %s%s", 597 new_method, url->file, version, 598 url->host, headers ); 588 599 589 600 new_host = g_strdup( url->host ); … … 597 608 598 609 g_free( url ); 610 g_free( version ); 599 611 } 600 612 -
protocols/twitter/twitter_http.c
r777461b rdd7b931 78 78 79 79 // Make the request. 80 g_string_printf(request, "%s %s%s%s%s HTTP/1. 0\r\n"80 g_string_printf(request, "%s %s%s%s%s HTTP/1.1\r\n" 81 81 "Host: %s\r\n" 82 82 "User-Agent: BitlBee " BITLBEE_VERSION " " ARCH "/" CPU "\r\n",
Note: See TracChangeset
for help on using the changeset viewer.