Created attachment 280599 [details] 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
Created attachment 280600 [details] Proposed patch
Thank you for looking into this, and for the patch! Unfortunately, webkit.org is not the right place for this patch. MHTML support has been removed from WebKit mainline long ago, so now we don't even have this file any more. This seems to have been made for some old fork.