PDA

View Full Version : gzipped http responses



shayz
6th January 2011, 10:38
Hi,

I'm using QtWebKit based browser running on Intel Canmore SoC.
In one of our tests we've discovered that loading www.weather.com takes forever. I compared it to Arora browser on an Ubuntu laptop and had similar load time.
After some investigating, I added the bolded line below to a QNetworkAccessManager wrapper class (called NetworkAccessManager).
The line was added in the createRequest overloaded function and seems to have fixed the issue.
Has anyone had similar problems before and if so, is there any way to reduce the time it takes to load a gzipped reply?


QNetworkReply *NetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request,
QIODevice *outgoingData)
{
QNetworkRequest req = request; // copy so we can modify
req.setRawHeader("Accept-Encoding", "identity");//<- bold line
QNetworkReply *reply = QNetworkAccessManager::createRequest(op, req, outgoingData);
}

--shay

javimoya
6th January 2011, 10:54
is your qt compiled with gzip support??

QNam only ask for accept-encoding gzip if your qt is compiled with zlib support

wysota
6th January 2011, 12:40
Is this site the only one that suffers from this behaviour or is it the same for any other webpage you open? Maybe the problem is with weather.com?

wilsondealmeida
3rd February 2011, 14:54
Hi guys,

I am using Arora Browser in an application and in a post response with gzip it not returns the html code but strange characters.

In this link, fill the text field with number 1 and submit the form:

http://www.crea-rs.org.br/apoloaplsrv01/servlet/org.crears.apolo.prod.hsel_findart

Than it shows a strange characters page.

Can someone help me on this? See you.