Daniel Lehman dlehman@esri.com writes:
HTTP_HandleRedirect updates both:
- the Host: field
- and session->hostname
If there is a custom port, it is appended to session->hostName. This causes problems for later HttpOpenRequest/process_host_port calls that append the port to the host name (resulting in "foobar:1234:1234")
There is already logic in HTTP_HandleRequest that will update the request->server if the new host or port don't match. in that case, get_server/process_host_port use the updated host and port and store them appended in server->host_port. If they already match, server->host_port is left untouched
The attached change removes the current custom port logic to instead use server->host_port to update the Host: field
It breaks the tests:
../../../tools/runtest -q -P wine -T ../../.. -M wininet.dll -p wininet_test.exe.so http && touch http.ok http.c:693: Test failed: Wrong URL http://test.winehq.org:80/tests/hello.html http.c:693: Test failed: Wrong URL http://test.winehq.org:80/tests/hello.html make[1]: *** [http.ok] Error 2