[Webkit-unassigned] [Bug 63696] New: Custom Accept-Encoding header prevents autoDecompress
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 30 02:40:21 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=63696
Summary: Custom Accept-Encoding header prevents autoDecompress
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
URL: http://developer.qt.nokia.com/forums/viewthread/2357/
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P3
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ttf11 at hotmail.com
When you set a custom "Accept-Encoding" raw header on a QNetworkRequest object (for example via an overridden QNetworkAccessManager::createRequest() ), QtWebKit will never decompress the reply anymore:
source code of qhttpnetworkconnection.cpp :
====================
value = request.headerField("accept-encoding");
if (value.isEmpty()) {
#ifndef QT_NO_COMPRESS
request.setHeaderField("Accept-Encoding", "gzip");
request.d->autoDecompress = true;
#else
// if zlib is not available set this to false always
request.d->autoDecompress = false;
#endif
}
====================
If the "accept-encoding" header was already set, request.d->autoDecompress is never set to true. This is even true if you manually set the header to "gzip" for example.
The solution consists of two parts:
1) If the current value contains "gzip", also set autoDecompress to true
2) add a custom method to manually set autoDecompress to true (useful if you do not want gzipped data, but if the server still sends it, then decode it anyway as a fallback method)
--
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