[Webkit-unassigned] [Bug 121123] New: Web Inspector: Do not try to parse incomplete HTTP requests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 10 14:18:24 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=121123

           Summary: Web Inspector: Do not try to parse incomplete HTTP
                    requests
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andrunko at gmail.com
                CC: timothy at apple.com, joepeck at webkit.org,
                    webkit-bug-importer at group.apple.com, graouts at apple.com


When working on a patch for bug #121121 I found an issue with the InspectorServer where it would try to parse an HTTP message before receiving the full message and thus fail connecting with the chromedevtools plugin.

What happens is that the WebSocketServerConnection receives buffers on WebSocketServerConnection::didReceiveSocketStreamData and calls WebSocketServerConnection::readHTTPMessage which then checks if we have a valid request by calling HTTPRequest::parseHTTPRequestFromBuffer. If the request is valid it tries to parse the message and clears the buffer, otherwise it continues adding data to the internal buffer until we have a valid request.

The problem is that currently HTTPRequest::parseHTTPRequestFromBuffer considers the request as valid before receiving the full message. To solve this we should make the method check if the request headers end with a blank line otherwise we consider the request as invalid (see also http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html).

Patch to follow.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list