Hans Leidekker : wininet: Send a content length header for all verbs other than GET.
Alexandre Julliard
julliard at winehq.org
Thu Jan 15 08:50:58 CST 2009
Module: wine
Branch: master
Commit: 1c07d94ddcb2cd46a06a14dcf553bfaf0454fe1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c07d94ddcb2cd46a06a14dcf553bfaf0454fe1f
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Jan 14 16:20:11 2009 +0100
wininet: Send a content length header for all verbs other than GET.
---
dlls/wininet/http.c | 2 +-
dlls/wininet/tests/http.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index cdcf8e1..a5352e4 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -3236,7 +3236,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
if (!lpwhr->lpszVerb)
lpwhr->lpszVerb = WININET_strdupW(szGET);
- if (dwContentLength || !strcmpW(lpwhr->lpszVerb, szPost))
+ if (dwContentLength || strcmpW(lpwhr->lpszVerb, szGET))
{
sprintfW(contentLengthStr, szContentLength, dwContentLength);
HTTP_HttpAddRequestHeadersW(lpwhr, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_ADD_IF_NEW);
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 34f4708..19eb982 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -1408,7 +1408,9 @@ static DWORD CALLBACK server_thread(LPVOID param)
else
send(c, notokmsg, sizeof notokmsg-1, 0);
}
- if (strstr(buffer, "POST /test5"))
+ if (strstr(buffer, "POST /test5") ||
+ strstr(buffer, "RPC_IN_DATA /test5") ||
+ strstr(buffer, "RPC_OUT_DATA /test5"))
{
if (strstr(buffer, "Content-Length: 0"))
{
@@ -2013,6 +2015,8 @@ static void test_http_connection(void)
test_proxy_direct(si.port);
test_header_handling_order(si.port);
test_basic_request(si.port, "POST", "/test5");
+ test_basic_request(si.port, "RPC_IN_DATA", "/test5");
+ test_basic_request(si.port, "RPC_OUT_DATA", "/test5");
test_basic_request(si.port, "GET", "/test6");
test_connection_header(si.port);
test_http1_1(si.port);
More information about the wine-cvs
mailing list