wininet: Don't change the verb if the server response is HTTP_STATUS_REDIRECT_KEEP_VERB.

This commit is contained in:
Hans Leidekker 2011-06-01 11:50:32 +02:00 committed by Alexandre Julliard
parent b7df063fde
commit 14d4d1957d

View file

@ -4734,7 +4734,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
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)
{ {
if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD)) if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD) &&
dwStatusCode != HTTP_STATUS_REDIRECT_KEEP_VERB)
{ {
HeapFree(GetProcessHeap(), 0, request->verb); HeapFree(GetProcessHeap(), 0, request->verb);
request->verb = heap_strdupW(szGET); request->verb = heap_strdupW(szGET);
@ -4904,7 +4905,8 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
dwBufferSize=sizeof(szNewLocation); dwBufferSize=sizeof(szNewLocation);
if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_LOCATION, szNewLocation, &dwBufferSize, NULL) == ERROR_SUCCESS) if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_LOCATION, szNewLocation, &dwBufferSize, NULL) == ERROR_SUCCESS)
{ {
if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD)) if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD) &&
dwCode != HTTP_STATUS_REDIRECT_KEEP_VERB)
{ {
HeapFree(GetProcessHeap(), 0, request->verb); HeapFree(GetProcessHeap(), 0, request->verb);
request->verb = heap_strdupW(szGET); request->verb = heap_strdupW(szGET);