[Interest] Debugging tip for QNetworkReply

Jason Kretzer Jason at gocodigo.com
Sat May 3 20:17:11 CEST 2014

The zip that fails and is unreadable is a 1k file.  The zip that I am attempting to download is ~55MB.  The 1k zip also cannot be opened by a zip program nor a text editor.  Is there a way I can tell what the failure is?  Perhaps, I can use wireshark to see the traffic and see the http response codes from the server. They should be 200, I would think since I can use a browser and get the zip(s) that way.  Perhaps a way to look through the request/reply objects to see what is going on?


-----Original Message-----
From: interest-bounces+jason=gocodigo.com at qt-project.org [mailto:interest-bounces+jason=gocodigo.com at qt-project.org] On Behalf Of Thiago Macieira
Sent: Friday, May 02, 2014 5:05 PM
To: interest at qt-project.org
Subject: Re: [Interest] Debugging tip for QNetworkReply

Em sex 02 maio 2014, às 10:45:16, Jason Kretzer escreveu:
> I am using the following code to download zip files from a url.  The 
> only thing that changes is the “id” in the url(one for each zip).  
> Anyway, the code always works on one of the zip files, but never works 
> on the other.  Both zips are on the server.  Both zips are 
> downloadable, if I access the url(s) from a web browser.  What I am 
> looking for is primarily direction on how to go about effectively 
> debugging this.  I tried using
> reply->errorString() right after loop.exec() — but it returns only 
> reply->“Unknown
> Error” whether the download is successful or not.  It should also be 
> noted that on failure a file is created but is not a readable zip file.

Why is it not readable? Is the file too short? Is it corrupted? Please compare the result with what was supposed to be there.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Interest mailing list
Interest at qt-project.org

More information about the Interest mailing list