[Webkit-unassigned] [Bug 50746] [Qt] GZip-Compressed content is not shown if end-of-file marker is missing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 01:24:52 PST 2010


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





--- Comment #1 from Thomas Thrainer <thomas.thrainer at 4tiitoo.com>  2010-12-10 01:24:53 PST ---
I just realized that patching QtWebKit alone is probably not enough.

In Qt, qhttpnetworkconnectionchannel.cpp (what a mouth full!), in the expand(...) method around line 585, QHttpNetworkReplyPrivate::gunzipBodyPartially(...) is called. The return value is compared to Z_STREAM_END if the received data was complete, which fails as the end-of-stream marker is missing. The decompressed data is _not_ appended to the received data in this case, instead an error is emited. This will cause the last piece of data to be lost.

The right thing to do would probably be to append the data if it was successfully received (i.e. ret >= Z_OK), emit readyRead and dataReadProgress anyways, and only finally emit an error if dataComplete && ret != Z_STREAM_END.

But I think somebody more knowledgeable than me should have a look at this and decide what's best to do. For now, QtWebKit does handle the eBay-site happily with the attached patch, even if some bytes are probably missing at the end.

I created a Qt-bug for this issue too (http://bugreports.qt.nokia.com/browse/QTBUG-16022).

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