HTTP: Don't let applications add Connection header to request

Robert Shearman rob at codeweavers.com
Mon Sep 13 11:07:32 CDT 2004


Hi,

I'm not entirely sure that this is the right place to put this as I'm 
not sure if we'd want to use the Connection header ourselves at some 
point, but it is a 2 line fix here and a 10 line fix elsewhere.

Changelog:
Don't let applications add Connection header to request.
-------------- next part --------------
diff -u -N -r -x '*~' -x '.#*' -x CVS -x Makefile -x '*.o' -x '*.orig' -x '*.diff' -x '*.rej' -x '*.spec.c' wine/dlls/wininet_2/http.c wine/dlls/wininet/http.c
--- wine/dlls/wininet_2/http.c	2004-09-13 17:02:57.913165104 +0100
+++ wine/dlls/wininet/http.c	2004-09-13 17:03:07.411721104 +0100
@@ -2299,7 +2299,10 @@
 
     /* Try to get index into standard header array */
     index = HTTP_GetStdHeaderIndex(field);
-    if (index >= 0)
+    /* Don't let applications add Connection header to request */
+    if ((index == HTTP_QUERY_CONNECTION) && (dwModifier & HTTP_ADDHDR_FLAG_REQ))
+        return TRUE;
+    else if (index >= 0)
     {
         lphttpHdr = &lpwhr->StdHeaders[index];
     }


More information about the wine-patches mailing list