summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-01-10 22:50:40 +0100
committerLars-Dominik Braun <lars@6xq.net>2012-01-10 22:52:27 +0100
commit4b9b4dfe7f6c7953838a6c08877d17414d0124f9 (patch)
tree6fa1bbd6172256568e870e1de0d4278fc73804b2
parenta28839739c62cd589b1c31e76696fd5831f84520 (diff)
downloadpianobar-4b9b4dfe7f6c7953838a6c08877d17414d0124f9.tar.gz
pianobar-4b9b4dfe7f6c7953838a6c08877d17414d0124f9.tar.bz2
pianobar-4b9b4dfe7f6c7953838a6c08877d17414d0124f9.zip
HTTP/1.1 compliant CONNECT
Host: is mandatory.
-rw-r--r--src/libwaitress/waitress.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index 5d37a4e..a971487 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -820,7 +820,10 @@ static WaitressReturn_t WaitressConnect (WaitressHandle_t *waith) {
WaitressReturn_t wRet;
snprintf (buf, sizeof (buf), "CONNECT %s:%s HTTP/"
- WAITRESS_HTTP_VERSION "\r\n",
+ WAITRESS_HTTP_VERSION "\r\n"
+ "Host: %s:%s\r\n"
+ "Proxy-Connection: close\r\n",
+ waith->url.host, WaitressDefaultPort (&waith->url),
waith->url.host, WaitressDefaultPort (&waith->url));
WRITE_RET (buf, strlen (buf));