http://bugs.winehq.org/show_bug.cgi?id=19351
Summary: RootsMagic 4 installer hangs while downloading place database Product: Wine Version: 1.1.25 Platform: PC URL: http://dl.filekicker.com/send/file/219954-2T11/RM4Setu p.exe OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: wininet AssignedTo: wine-bugs@winehq.org ReportedBy: arethusa26@gmail.com
Created an attachment (id=22410) --> (http://bugs.winehq.org/attachment.cgi?id=22410) RootsMagic 4 installer +wininet trace
With today's Git (wine-1.1.25-487-gf59a309), when the "Download Place Database for geocoding and gazetteering" option is selected (by default), the installer attempts to retrieve the relevant file. Instead of working as expected, the installer simply hangs at "Getting file information..." and the download attempt cannot be aborted. winedbg seems to indicate that the download thread is hung trying to read from the stream:
Backtrace: =>0 0xb7f0042e (0x029fb62c) 1 0x7df0a858 HTTPREQ_Read+0x368(req=<register ESI not in topmost frame>, buffer=0x29fb6bc, size=<register EDI not in topmost frame>, read=0x29fb6b8, sync=1) [/home/andrew/wine-git/dlls/wininet/http.c:2119] in wininet (0x029fb68c) 2 0x7df0a9ae HTTP_DrainContent+0x7e(req=<register ESI not in topmost frame>) [/home/andrew/wine-git/dlls/wininet/http.c:2551] in wininet (0x029fbecc) 3 0x7df11a05 HTTP_HttpSendRequestW+0x1975(lpwhr=0x16eec0, lpszHeaders=(nil), dwHeaderLength=0, lpOptional=(nil), dwOptionalLength=0, dwContentLength=0, bEndRequest=1) [/home/andrew/wine-git/dlls/wininet/http.c:3819] in wininet (0x029fe0cc)
From the +wininet trace, what seems to happen is that the installer sends a
HEAD request:
trace:wininet:HttpOpenRequestW (0x2, L"HEAD", L"/send/file/221146-Z3UX/PlaceDBSetup.exe", (null), (null), 0x16ee20, a0000000, 00000000) ... trace:wininet:HTTP_HttpSendRequestW full request -> "HEAD /send/file/221146-Z3UX/PlaceDBSetup.exe HTTP/1.1\r\nAccept: */*\r\nHost: dl.filekicker.com\r\nContent-Length: 0\r\nUser-Agent: IS Download DLL\r\n\r\n"
and gets back:
trace:wininet:HTTP_GetResponseHeaders raw headers: L"HTTP/1.1 302 Object moved\r\nDate: Fri, 17 Jul 2009 07:59:26 GMT\r\nX-Powered-By: ASP.NET\r\nP3P: CP='NOI ADM DEV COM NAV OUR IND'\r\nLocation: http://dl5.filekicker.net/private/$adv-rgn1$1247860766$160ac4f01d68678bfbb5d..."...
A HEAD request is not supposed to contain any message body, so wininet may not be handling the HEAD request correctly and tries to read further data when there is none to be expected.
http://bugs.winehq.org/show_bug.cgi?id=19351
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net
--- Comment #1 from Hans Leidekker hans@meelstraat.net 2009-07-17 04:13:16 --- The HEAD request is redirected and the redirect response says:
trace:wininet:HTTP_InterpretHttpHeader field(L"Content-Length") Value(L"348")
This would be the redirect message to be displayed in a browser. HTTP_DrainContent is called to read it before following the redirect, which seems correct to me.
http://bugs.winehq.org/show_bug.cgi?id=19351
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer
--- Comment #2 from Andrew Nguyen arethusa26@gmail.com 2009-07-17 04:33:08 --- While I don't know anything about HTTP, I'm not sure that trying to read a message body for a HEAD request is right. From RFC 2616:
"The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification."
It seems to me that if the installer was interested in the redirect message at that point, it would not have sent a GET request. A packet trace on Windows seems to show the installer doing a HEAD request on the original URL, then a HEAD request on the redirected URL. After that, the installer does a GET on the original URL, receiving the redirect message content, and then does a subsequent GET on the redirect URL for the actual content.
http://bugs.winehq.org/show_bug.cgi?id=19351
--- Comment #3 from Hans Leidekker hans@meelstraat.net 2009-07-17 05:53:20 --- The current code converts redirects to GET requests. This may not be correct when the original request is a HEAD request, as your traces suggest.
http://bugs.winehq.org/show_bug.cgi?id=19351
--- Comment #4 from Hans Leidekker hans@meelstraat.net 2009-07-17 06:36:48 --- Created an attachment (id=22413) --> (http://bugs.winehq.org/attachment.cgi?id=22413) wininet: Fix HEAD redirects.
Try this patch.
http://bugs.winehq.org/show_bug.cgi?id=19351
--- Comment #5 from Andrew Nguyen arethusa26@gmail.com 2009-07-17 06:44:29 --- Thanks, that does the trick. The installer successfully initiates and completes the download with the patch.
http://bugs.winehq.org/show_bug.cgi?id=19351
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #6 from Vitaliy Margolen vitaliy@kievinfo.com 2009-07-17 07:44:37 --- Confirming per comment #5.
http://bugs.winehq.org/show_bug.cgi?id=19351
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Andrew Nguyen arethusa26@gmail.com 2009-07-23 05:16:02 --- This is fixed in wine-1.1.26-132-gaf77e9b by commit fa4c25ddf4641a77829769dc43ecb0b25d15229d.
http://bugs.winehq.org/show_bug.cgi?id=19351
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2009-08-07 12:57:28 --- Closing bugs fixed in 1.1.27.