Commit 6bb143af authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Don't send any data after being redirected.

parent 0d8a826e
...@@ -3271,7 +3271,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -3271,7 +3271,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwContentLength, BOOL bEndRequest) DWORD dwContentLength, BOOL bEndRequest)
{ {
INT cnt; INT cnt;
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE, redirected = FALSE;
LPWSTR requestString = NULL; LPWSTR requestString = NULL;
INT responseLen; INT responseLen;
BOOL loop_next; BOOL loop_next;
...@@ -3373,7 +3373,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -3373,7 +3373,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
goto lend; goto lend;
/* send the request as ASCII, tack on the optional data */ /* send the request as ASCII, tack on the optional data */
if( !lpOptional ) if (!lpOptional || redirected)
dwOptionalLength = 0; dwOptionalLength = 0;
len = WideCharToMultiByte( CP_ACP, 0, requestString, -1, len = WideCharToMultiByte( CP_ACP, 0, requestString, -1,
NULL, 0, NULL, NULL ); NULL, 0, NULL, NULL );
...@@ -3467,6 +3467,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -3467,6 +3467,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
} }
HeapFree( GetProcessHeap(), 0, new_url ); HeapFree( GetProcessHeap(), 0, new_url );
} }
redirected = TRUE;
} }
} }
if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTH) && bSuccess) if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTH) && bSuccess)
......
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