[Webkit-unassigned] [Bug 36395] New: [Qt] Patch to add support for Content-Disposition...

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 19 16:08:29 PDT 2010


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

           Summary: [Qt] Patch to add support for Content-Disposition...
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: adawit at kde.org


Created an attachment (id=51199)
 --> (https://bugs.webkit.org/attachment.cgi?id=51199)
Content-Disposition support

The attached file is an attempt to fix missing support for the
Content-Disposition header in QtWebKit. Currently, this HTTP header is
blissfully ignored by QtWebKit and causes problems for all clients that rely on
it as a rendering engine. 

The attached patch attempts to resolve this issue and is based on the way this
issue is handled in the chromium source code. Basically the patch checks for
the presence of a content-disposition header and changes the resource handling
policy to PolicyDownload. This forces any content that is supposed to be
downloaded, i.e. contains the "attachement" keyword in the header, to be
reported as unsupportedContent to the client using this library.

There is one cavet with the patch I provided here. Because the patch forces the
request to be treated as a download request, the action the user took (e.g.
clicking on a link), will be ignored by default unless forwarding
unsupportedContent signal is enabled and handled. One possible solution to this
would be to simply add a new signal, e.g. QWebPage::downloadResponse
(QNetworkReply*) or QWebPage::downloadRequest(QNetworkReply*). Then "void
FrameLoaderClientQt::download(...)" could be amended to emit the new signal
when the "Content-Disposition" header is detected. This is only a couple of
line of additional code in the afforementioned function. However, that depends
on whether or not a.) the patch is accepted and b.) simply sending
unsupportedContent is not acceptable inorder to support the content-disposition
header.

Finally here is a test site for checking "Content-Disposition" support in your
rendering engine/browser of choice:

http://greenbytes.de/tech/tc2231/

Regards,
Dawit A.

-- 
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