Results 1 to 4 of 4

Thread: gzipped http responses

  1. #1
    Join Date
    Oct 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default gzipped http responses

    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?

    Qt Code:
    1. QNetworkReply *NetworkAccessManager::createRequest(Operation op,
    2. const QNetworkRequest &request,
    3. QIODevice *outgoingData)
    4. {
    5. QNetworkRequest req = request; // copy so we can modify
    6. req.setRawHeader("Accept-Encoding", "identity");//<- bold line
    7. QNetworkReply *reply = QNetworkAccessManager::createRequest(op, req, outgoingData);
    8. }
    To copy to clipboard, switch view to plain text mode 
    --shay
    Last edited by high_flyer; 6th January 2011 at 10:44. Reason: code tags

  2. #2
    Join Date
    Jul 2009
    Posts
    74
    Thanks
    2
    Thanked 6 Times in 6 Posts

    Default Re: gzipped http responses

    is your qt compiled with gzip support??

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

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: gzipped http responses

    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?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: gzipped http responses

    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/apoloaplsr...d.hsel_findart

    Than it shows a strange characters page.

    Can someone help me on this? See you.

Similar Threads

  1. qUncompress and gzipped files
    By roxton in forum Qt Programming
    Replies: 3
    Last Post: 17th April 2011, 10:41
  2. Replies: 2
    Last Post: 22nd June 2010, 09:04
  3. qUncompress with QHttp gzipped response
    By ricky92 in forum Qt Programming
    Replies: 10
    Last Post: 1st December 2009, 20:36
  4. QUdpSocket not getting responses
    By mhoover in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2009, 02:40
  5. open/write gzipped file
    By niko in forum Newbie
    Replies: 10
    Last Post: 12th December 2006, 20:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.