Results 1 to 10 of 10

Thread: QHttp, corrupted files?

  1. #1
    Join Date
    May 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QHttp, corrupted files?

    I have a little problem with QHttp, it seems to create corrupted files, when download is finished

    I need help because I can't find the error

    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
    Last edited by Arbiter; 14th May 2007 at 18:24.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp, corrupted files?

    The zips are corrupted or the files contained in the archives, after you extract them?

  3. #3
    Join Date
    May 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QHttp, corrupted files?

    The whole zips, if I test them with md5sum i get even different md5 digests

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp, corrupted files?

    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

  5. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp, corrupted files?

    Does CZipFile keeps account of the byte order and things like that?

  6. #6
    Join Date
    May 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QHttp, corrupted files?

    CZipFile is not used, the relative code is commented out, but downloading a simple ASCII file seems to work

  7. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp, corrupted files?

    Yeah, that git viewer doesn't have syntax highlighting .
    What isTextModeEnabled returns on the QFile?

  8. #8
    Join Date
    May 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QHttp, corrupted files?

    it returns false

  9. #9
    Join Date
    May 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QHttp, corrupted files?

    still can't find the source of the problem

  10. #10
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp, corrupted files?

    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.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.