http://bugs.winehq.org/show_bug.cgi?id=14183
--- Comment #3 from Yann Droneaud yann@droneaud.fr 2008-06-30 01:25:43 --- (In reply to comment #2)
Thank you for the patch Yann. I think you're right, processing cookies should be moved to HttpSendRequest and inside the loop as you suggest, although we'll need tests to confirm that. Why did you move retrieval of the hostname outside the loop? I think that will break external redirects.
Very interesting, I think you've spotted another problem. In fact, the call to retrieve Host: was in a debug clause:
if (TRACE_ON(wininet)) { LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr,szHost); TRACE("Going to url %s %s\n", debugstr_w(Host->lpszValue), debugstr_w(lpwhr->lpszPath)); }
To retrieve the cookie, the Host: value is needed unconditionnaly, so I moved the call to HTTP_GetHeader() earlier. But I didn't thought about redirect here. I will try to fix that.