wininet/tests: Don't include the trailing '\0' in dwHeadersLength otherwise HttpSendRequestEx() sends it too which some servers object to.

Francois Gouget fgouget at free.fr
Mon Feb 18 17:20:50 CST 2008


---

This fixes the wininet http tests on my Windows systems because they are 
on a special subnet on which I do some transparent proxying through 
Squid. And Squid happens to be a server which objects to malformed HTTP 
headers.

 dlls/wininet/tests/http.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 4aed85d..fb561c4 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -894,8 +894,8 @@ static void HttpSendRequestEx_test(void)
     BufferIn.dwStructSize = sizeof( INTERNET_BUFFERS);
     BufferIn.Next = (LPINTERNET_BUFFERS)0xdeadcab;
     BufferIn.lpcszHeader = szContentType;
-    BufferIn.dwHeadersLength = sizeof(szContentType);
-    BufferIn.dwHeadersTotal = sizeof(szContentType);
+    BufferIn.dwHeadersLength = sizeof(szContentType)-1;
+    BufferIn.dwHeadersTotal = sizeof(szContentType)-1;
     BufferIn.lpvBuffer = szPostData;
     BufferIn.dwBufferLength = 3;
     BufferIn.dwBufferTotal = sizeof(szPostData)-1;
-- 
1.5.3.8




More information about the wine-patches mailing list