Commit f8f9c4cb authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Don't loop on response codes other than 301 and 302.

parent 165b21dd
......@@ -1267,14 +1267,16 @@ static BOOL receive_response( request_t *request, BOOL async )
if (!query_headers( request, query, NULL, &request->content_length, &size, NULL ))
request->content_length = ~0UL;
if (status == 200) break;
if (status == 301 || status == 302)
{
if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break;
drain_content( request );
if (!(ret = handle_redirect( request ))) break;
ret = send_request( request, NULL, 0, NULL, 0, 0, 0, FALSE ); /* recurse synchronously */
continue;
}
ret = send_request( request, NULL, 0, NULL, 0, 0, 0, FALSE ); /* recurse synchronously */
if (status == 401) FIXME("authentication not supported\n");
break;
}
if (async)
......
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