[Bug 19489] New: WinHttpSendRequest does not support empty string ("") as headers argument

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jul 28 06:57:00 CDT 2009


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 at winehq.org
        ReportedBy: arzwine at 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.



More information about the wine-bugs mailing list