[Bug 58737] New: Download of large file via WinHTTP fails with WSATIMEDOUT
http://bugs.winehq.org/show_bug.cgi?id=58737 Bug ID: 58737 Summary: Download of large file via WinHTTP fails with WSATIMEDOUT Product: Wine Version: 10.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp Assignee: wine-bugs(a)winehq.org Reporter: felixhaedicke(a)web.de Distribution: --- Created attachment 79362 --> http://bugs.winehq.org/attachment.cgi?id=79362 Source code: Download a file (without acutally storing it) via HTTPS via WinHTTP See attached sample code: For particular (large) files, downloads using wine's WinHTTP implementations can fail reproducibly with a WSATIMEDOUT. This happens when running the installer of Condor 3 (https://www.condorsoaring.com), which is obviously built with "Inno Setup". The installer downloads a 14 GB archive from https://downloads3.condorsoaring.com/V3/Landscapes1.zip during installation. Unfortunately, when the actual download is finished, the installer fails with a code 10060 (WSATIMEDOUT) error message. Using the attached sample code, I could reproduce this problem. The file is downloaded, but the last WinHttpQueryDataAvailable() call fails with WSATIMEDOUT (instead of detecting EOF): winhttpdownload.exe "downloads3.condorsoaring.com" "/V3/Landscapes1.zip" It seems to work fine for most other downloads, even for files which are larger than 4GB (4294967295 bytes, DWORD max value). The sample code works fine on Windows 11. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 --- Comment #1 from Felix Hädicke <felixhaedicke(a)web.de> --- Created attachment 79363 --> http://bugs.winehq.org/attachment.cgi?id=79363 WINEDEBUG=winhttp log Debug output of WINEDEBUG=winhttp wine winhttpdownload.exe "downloads3.condorsoaring.com" "/V3/Landscapes1.zip -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 --- Comment #2 from Felix Hädicke <felixhaedicke(a)web.de> --- Looks like the end of stream detection does not work reliably. See function end_of_read_data() in request.c, which compares the DWORD values request->content_length and request->content_read. Both variable values are incorrect: content_length is 4294967295 (DWORD max value) in this case. content_read is a lower value because the variable has overflowed several times. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 --- Comment #3 from Felix Hädicke <felixhaedicke(a)web.de> --- Created attachment 79364 --> http://bugs.winehq.org/attachment.cgi?id=79364 unsigned long long type for variables content_length / content_read It works fine after changing variable type to unsigned long long for variables content_length and content_read. See attached patch. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 --- Comment #4 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to Felix Hädicke from comment #3)
Created attachment 79364 [details] unsigned long long type for variables content_length / content_read
It works fine after changing variable type to unsigned long long for variables content_length and content_read. See attached patch.
Thanks for the bug report. UINT64 is more idiomatic than 'unsigned long long' here but otherwise the patch looks good. Would you mind opening an MR on gitlab.winehq.org? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |2827471c57299793d8e08686791 | |84f8d762a5309 --- Comment #5 from Hans Leidekker <hans(a)meelstraat.net> --- Fixed by 2827471c57299793d8e0868679184f8d762a5309. Thanks for the bug report and the patch! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58737 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.17. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla