[Webkit-unassigned] [Bug 26181] New: HTTPBody not set on file:// POST/PUT requests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 3 19:24:19 PDT 2009


           Summary: HTTPBody not set on file:// POST/PUT requests
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: tolmasky at gmail.com

Currently, WebKit discards the body of any PUT or POST request to a file:///
URL before that request is sent to the ResourceLoadDelegate. Although the HTTP
body does not mean anything in requests that are ultimately hitting the file
system directly (file://), not including breaks the ResourceLoadDelegate API.

- (NSURLRequest

As per the docs (linked below), this method gives the developer the chance to
modify the request, or replace it entirely. So, for example, the developer may
wish to intercept file:// requests and swap them out for HTTP requests to
http://example.com, essentially mimicking a file system in their application.
In other words, it gives the developer the opportunity to first take a stab at
making sense of this situation before WebKit. The current WebKit behavior is
strictly lossy as it will not allow you to swap a file:// POST for a corrected
http:// POST. Instead, the POST information is discarded internally.
Additionally, even though the request body has been modified (discarded), the
HTTP method is not altered, so the delegate still receives a POST request, but
the request lacks a body.

It would be prefferable if WebKit instead kept the body intact, and allowed the
delegate to interpret, alter, or discard the request like any other. An
alternative fix would be to modify all file:// PUT/POST requests to be GET
requests. While this would be consistent, it would not give the developer a
first-pass opportunity to fix or replace the request (he or she would not be
able to tell the difference between a file:// PUT and a file:// GET). Since
this API specifically mentions that it may be sent several times as it is
redirected, one good balance would be to send the initial PUT file:// request
with HTTP body intact, and if it is not modified, to then change the request to
the actual file:// GET request that will take place, and call this method


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

More information about the webkit-unassigned mailing list