Commit 5b173cb4 authored by Karsten Elfenbein's avatar Karsten Elfenbein Committed by Alexandre Julliard

wininet: Follow 307 temporary redirect.

parent dad59138
...@@ -4415,6 +4415,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, ...@@ -4415,6 +4415,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
dwBufferSize=sizeof(szNewLocation); dwBufferSize=sizeof(szNewLocation);
if ((dwStatusCode == HTTP_STATUS_REDIRECT || if ((dwStatusCode == HTTP_STATUS_REDIRECT ||
dwStatusCode == HTTP_STATUS_MOVED || dwStatusCode == HTTP_STATUS_MOVED ||
dwStatusCode == HTTP_STATUS_REDIRECT_KEEP_VERB ||
dwStatusCode == HTTP_STATUS_REDIRECT_METHOD) && dwStatusCode == HTTP_STATUS_REDIRECT_METHOD) &&
HTTP_HttpQueryInfoW(request,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL) == ERROR_SUCCESS) HTTP_HttpQueryInfoW(request,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL) == ERROR_SUCCESS)
{ {
...@@ -4574,7 +4575,10 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_ ...@@ -4574,7 +4575,10 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
{ {
DWORD dwCode,dwCodeLength = sizeof(DWORD); DWORD dwCode,dwCodeLength = sizeof(DWORD);
if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, &dwCode, &dwCodeLength, NULL) == ERROR_SUCCESS if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, &dwCode, &dwCodeLength, NULL) == ERROR_SUCCESS
&& (dwCode == 302 || dwCode == 301 || dwCode == 303)) && (dwCode == HTTP_STATUS_REDIRECT ||
dwCode == HTTP_STATUS_MOVED ||
dwCode == HTTP_STATUS_REDIRECT_METHOD ||
dwCode == HTTP_STATUS_REDIRECT_KEEP_VERB))
{ {
WCHAR *new_url, szNewLocation[INTERNET_MAX_URL_LENGTH]; WCHAR *new_url, szNewLocation[INTERNET_MAX_URL_LENGTH];
dwBufferSize=sizeof(szNewLocation); dwBufferSize=sizeof(szNewLocation);
......
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