PDA

View Full Version : QHttp, corrupted files?



Arbiter
14th May 2007, 19:16
I have a little problem with QHttp, it seems to create corrupted files, when download is finished :eek:

I need help because I can't find the error :o

It's not a complex application but it uses several other classes and i think it's not recommended to past all the source files here, so you can grab a copy of the source tree using git by cloning my public git repository using:

git clone http://www.arbiterlab.net/gitweb/qmd

Or you can navigate the git repository itself using gitweb

http://www.arbiterlab.net/gitweb/?p=qmd;a=tree

Relevant code is placed in mainwindow.cpp file under src/

Thanks in advance :)

marcel
14th May 2007, 19:24
The zips are corrupted or the files contained in the archives, after you extract them?

Arbiter
14th May 2007, 19:34
The whole zips, if I test them with md5sum i get even different md5 digests

marcel
14th May 2007, 19:44
Have you tried downloading a simple ASCII text file?
Maybe the CZIpFile class contains some errors?

If a plain ASCII file can't be downloaded OK, then the problem is in the way you handle QHttp. We'll see about that later, but try with a simple file first.

Regards

marcel
14th May 2007, 19:49
Does CZipFile keeps account of the byte order and things like that?

Arbiter
14th May 2007, 20:24
CZipFile is not used, the relative code is commented out, but downloading a simple ASCII file seems to work :confused:

marcel
14th May 2007, 21:04
Yeah, that git viewer doesn't have syntax highlighting :).
What isTextModeEnabled returns on the QFile?

Arbiter
15th May 2007, 13:58
it returns false

Arbiter
16th May 2007, 14:11
still can't find the source of the problem :crying:

marcel
16th May 2007, 14:23
How about if you tried to read yourself the data as it becomes available and write it in the output file ( binary )?
You can use bytesAvailable, etc...

If you can do a little debugging on QHttp when it writes to the file ( using the current source code ) would be even better.