From 4b9b4dfe7f6c7953838a6c08877d17414d0124f9 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 10 Jan 2012 22:50:40 +0100 Subject: HTTP/1.1 compliant CONNECT Host: is mandatory. --- src/libwaitress/waitress.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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)); -- cgit v1.2.3