[Mono-bugs] [Bug 465638] New: HttpWebRequest does not handle empty response with 204 status code.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 13 03:51:16 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=465638


           Summary: HttpWebRequest does not handle empty response with 204
                    status code.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bassam at symform.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Attached is a repro that causes HttpWebRequest to send wrong requests to the
web server and hang. Observations:

* This seems to only happen when performing asynchronous operations.
* This seems to only happen when the response is a 204 status code and the
Content-Length is set to 0. Changing the status code to 200 fixes the problem,
and so does sending a response.

A tcpdump of the erroneous contents is as follows:

POST / HTTP/1.1
Content-Length: 10
Connection: keep-alive
Host: 192.168.2.1

HTTP/1.1 204 No Content
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 13 Jan 2009 08:43:21 GMT

POST / HTTP/1.1
Content-Length: 10
Host: 192.168.2.1

POST / HTTP/1.1            <--- Note the double POST after the 204 response.
Content-Length: 10
Host: 192.168.2.1

HTTP/1.1 204 No Content
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 13 Jan 2009 08:43:21 GMT

HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 13 Jan 2009 08:43:21 GMT
Connection: close
Content-Length: 326

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list