[Bug 19489] New: WinHttpSendRequest does not support empty string ("") as headers argument
http://bugs.winehq.org/show_bug.cgi?id=19489 Summary: WinHttpSendRequest does not support empty string ("") as headers argument Product: Wine Version: 1.1.26 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: winhttp AssignedTo: wine-bugs(a)winehq.org ReportedBy: arzwine(a)yahoo.com Created an attachment (id=22659) --> (http://bugs.winehq.org/attachment.cgi?id=22659) simple fix for problem mentioned When using WinHttpSendRequest() with an empty string as 'headers' argument and -1 as a value for the header length, an INVALID_PARAMETER error is returned. add_request_headers() in winhttp/request.c correctly performs a strlen() on the headers argument if header length is specified as -1. The problem is that if headers is an empty string, and there is no actual header, the search for '\r\n\ fails, the terminating zero is found, and add_request_header breaks out of the loop with a FALSE return value. Under Windows, this call is successful. Attached simple return statement fixes the problem (but maybe should be fixed in a different way). Thanks, Arnoud. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hans(a)meelstraat.net --- Comment #1 from Hans Leidekker <hans(a)meelstraat.net> 2009-07-28 09:33:06 --- Please send the patch to wine-patches(a)winehq.org in diff -u format. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 --- Comment #2 from Austin English <austinenglish(a)gmail.com> 2009-07-28 11:12:45 --- (In reply to comment #0)
Created an attachment (id=22659) --> (http://bugs.winehq.org/attachment.cgi?id=22659) [details] simple fix for problem mentioned
When using WinHttpSendRequest() with an empty string as 'headers' argument and -1 as a value for the header length, an INVALID_PARAMETER error is returned.
add_request_headers() in winhttp/request.c correctly performs a strlen() on the headers argument if header length is specified as -1.
The problem is that if headers is an empty string, and there is no actual header, the search for '\r\n\ fails, the terminating zero is found, and add_request_header breaks out of the loop with a FALSE return value.
Under Windows, this call is successful.
Please add a testcase before submitting to wine-patches. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com --- Comment #3 from Dan Kegel <dank(a)kegel.com> 2009-10-29 12:50:12 --- Committed, http://www.winehq.org/pipermail/wine-cvs/2009-October/061094.html What apps did this affect? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 --- Comment #4 from Arnoud <arzwine(a)yahoo.com> 2009-11-03 07:34:28 --- (In reply to comment #3)
Committed, http://www.winehq.org/pipermail/wine-cvs/2009-October/061094.html
What apps did this affect?
Thanks. That was a private app that I had to port to wine. Just wanted to backport some patches I did for that project, as the app acted conform the APIs. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #5 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-11-03 07:56:55 --- Patch accepted - fixed -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=19489 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> 2009-11-13 12:44:15 --- Closing bugs fixed in 1.1.33. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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)
-
wine-bugs@winehq.org