Commit cc7a86ec authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Use HTTP_ADDHDR_FLAG_REPLACE flag in HTTP_HttpSendRequest to add Content-Length header.

parent 9d058e91
......@@ -2240,7 +2240,8 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','l','i','\r','\n',0};
WCHAR contentLengthStr[sizeof szContentLength/2 /* includes \n\r */ + 20 /* int */ ];
sprintfW(contentLengthStr, szContentLength, dwContentLength);
HTTP_HttpAddRequestHeadersW(lpwhr, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_ADD);
HTTP_HttpAddRequestHeadersW(lpwhr, contentLengthStr, -1L,
HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE);
}
Host = HTTP_GetHeader(lpwhr,szHost);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment