http://bugs.winehq.org/show_bug.cgi?id=29715
Bug #: 29715 Summary: winhttp method "HEAD" is broken Product: Wine Version: 1.3.37 Platform: x86 URL: http://netikka.net/dev/winhttphead.exe OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp AssignedTo: wine-bugs@winehq.org ReportedBy: ocean04@suomi24.fi Classification: Unclassified
small sample: http://netikka.net/dev/winhttphead.exe
Method HEAD should usually return very quickly, but instead it takes ages for any url I tried.
fhttp:=createoleobject('WinHttp.WinHttpRequest.5.1'); fhttp.open('HEAD', edit1.text, false); fhttp.send(); memo1.text:=fhttp.getallresponseheaders; edit2.text:=inttostr(fhttp.status); edit3.Text:=fhttp.statustext;
Here it fails immediately with ole error
Url: http://javadl.sun.com/webapps/download/GetFile/1.6.0_30-b12/windows-i586/jre...
in winhttp log I see 2 problems. For some reason server returns "302 Moved Temporarily". It tries follow and uses GET method.
winetricks winhttp -> server correctly returns 200
http://bugs.winehq.org/show_bug.cgi?id=29715
--- Comment #1 from ocean04@suomi24.fi 2012-01-27 00:58:31 CST --- Created attachment 38566 --> http://bugs.winehq.org/attachment.cgi?id=38566 winhttp log
http://bugs.winehq.org/show_bug.cgi?id=29715
ocean04@suomi24.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=29715
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2012-01-27 01:37:57 CST --- That's one is suspicious:
--- 0009:trace:winhttp:winhttp_request_GetIDsOfNames 0x174668, {00000000-0000-0000-0000-000000000000}, 0x32ec08, 1, 1033, 0x32ec4c 0009:trace:winhttp:winhttp_request_Invoke 0x174668, 5, {00000000-0000-0000-0000-000000000000}, 0, 1, 0x32ec04, (nil), 0x32ebe4, (nil) 0009:trace:winhttp:winhttp_request_Send 0x174668, {vt 10} ---
I mean VT_ERROR body here.
http://bugs.winehq.org/show_bug.cgi?id=29715
--- Comment #3 from ocean04@suomi24.fi 2012-01-27 03:30:44 CST --- GET also fails for this url. There is sample in bug 27927 you can test.
I can choose from send(); or send; or send(''); or send(null); all of these are good in native winhttp.
Another url HEAD fails here http://chessbase.com
http://bugs.winehq.org/show_bug.cgi?id=29715
--- Comment #4 from Hans Leidekker hans@meelstraat.net 2012-01-27 03:43:51 CST --- HEAD is basically unimplemented.
The first bug is that we turn any request into a GET request when redirecting, where it should only be done for POST requests.
The second bug is that we're not closing the connection when there's nothing to read.
The third bug is that we attempt to read data after receiving a response to a HEAD request.
I have patches for all of these.
http://bugs.winehq.org/show_bug.cgi?id=29715
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ebc4fd146285d4f45803d52b1b9 | |da6cddfad2058 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #5 from Hans Leidekker hans@meelstraat.net 2012-01-27 11:42:35 CST --- Fixed. Thanks for the nice test case.
http://bugs.winehq.org/show_bug.cgi?id=29715
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2012-01-27 14:16:53 CST --- Closing bugs fixed in 1.4-rc1.