aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-04-18 16:14:28 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2011-04-18 16:14:28 +0200
commit2423c939e096ded3bf6a09f5fc70ba2218df85cd (patch)
treed75c9c0379d497d4b98c3677b24c6a78e721974d /lib
parent6eca2eb9a06d0991fa0f431839e528177313566a (diff)
Send Connection: close headers so webservers won't try keepalive connections
which http_client really can't deal with.
Diffstat (limited to 'lib')
-rw-r--r--lib/http_client.c1
-rw-r--r--lib/oauth.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/http_client.c b/lib/http_client.c
index 69f06ec5..8b045414 100644
--- a/lib/http_client.c
+++ b/lib/http_client.c
@@ -92,6 +92,7 @@ struct http_request *http_dorequest_url( char *url_string, http_input_function f
request = g_strdup_printf( "GET %s HTTP/1.0\r\n"
"Host: %s\r\n"
+ "Connection: close\r\n"
"User-Agent: BitlBee " BITLBEE_VERSION " " ARCH "/" CPU "\r\n"
"\r\n", url->file, url->host );
diff --git a/lib/oauth.c b/lib/oauth.c
index 9c67363a..372a62d3 100644
--- a/lib/oauth.c
+++ b/lib/oauth.c
@@ -285,6 +285,7 @@ static void *oauth_post_request( const char *url, GSList **params_, http_input_f
"Host: %s\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n"
"Content-Length: %zd\r\n"
+ "Connection: close\r\n"
"\r\n"
"%s", url_p.file, url_p.host, strlen( post ), post );
g_free( post );