[Webkit-unassigned] [Bug 158423] New: MHTML: Document not displayed due to incorrect folding whitespace handling
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 6 09:35:26 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=158423
Bug ID: 158423
Summary: MHTML: Document not displayed due to incorrect folding
whitespace handling
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: Page Loading
Assignee: webkit-unassigned at lists.webkit.org
Reporter: horst.reiterer at fabasoft.com
CC: beidson at apple.com
Created attachment 280599
--> https://bugs.webkit.org/attachment.cgi?id=280599&action=review
Test Document
Loading the attached MHTML document (test.mht) in WebKit results in an empty document. The underlying problem is that the MHTML parser does not parse folding whitespace correctly.
The initial header is as follows:
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextPart_000_0000_01C12184.8FEC43F0"; type=text/html
The second line of the folded Content-Type header starts with a space rather than a tabulator. In RFC2822, folding whitespace is defined as follows:
FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
obs-FWS
So, the second line may start with a space or a tabulator - the input is correct. However, the parser only handles the tabulator case:
qt/qtwebkit/Source/WebCore/platform/network/MIMEHeader.cpp:
if (line[0] == '\t') {
ASSERT(!key.isEmpty());
With the attached patch (qt-everywhere-opensource-5.4.1-html-fws-sp.patch) against the WebKit version that comes with QT 5.4.1, the document is displayed as expected.
As the issue occured in the context of QT, we also reported the issue there:
https://bugreports.qt.io/browse/QTBUG-53869
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160606/61ff6618/attachment.html>
More information about the webkit-unassigned
mailing list