[Interest] Debugging tip for QNetworkReply

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Sun May 4 09:24:53 CEST 2014


A couple of questions to help debug further.

* What platform are you running this on and what's the version of Qt?
* What is the MIME type set by the webserver when responding to your
request (you can check it by dumping the headers received)
* According to the webserver logs, how much data was returned for the
problematic zip file?
* Whats the size of the zip that works?


-mandeep


On Sat, May 3, 2014 at 11:47 PM, Jason Kretzer <Jason at gocodigo.com> wrote:
> 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?
>
> -Jason
>
> -----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
> http://lists.qt-project.org/mailman/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list