Results 1 to 4 of 4

Thread: maybe QHttp question

  1. #1
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default maybe QHttp question

    Hm, I have very strange problem. I'm getting files from server with QHttp.
    When I try to download mp3 file all ok, but when plugin (made with Qt =)). I also got it BUT "without" ~2kb ;(
    help me please.

    PS. in attach is the screen (original - bigger, in the left side) made with kdiff3, I understood that for some reasons QHttp "see" eof sooner that in real life is =).
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: maybe QHttp question

    Could you, by any chance, prepare a minimal compilable example reproducing the problem?
    J-P Nurmi

  3. #3
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: maybe QHttp question

    there it is!
    in main.cpp there already is the location of plugin file. try to download it via this "script" =) and via browser (ie firefox)
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: maybe QHttp question

    Try this: http://www.cs.tut.fi/~nurmi22/libClipMD.so

    Qt Code:
    1. #include <QtCore>
    2. #include <QtNetwork>
    3. #include <QtDebug>
    4.  
    5. int main(int argc, char* argv[])
    6. {
    7. QCoreApplication app(argc, argv);
    8.  
    9. QFile file("plugin.so");
    10. QHttp http("www.cs.tut.fi");
    11. http.get("/~nurmi22/libClipMD.so", &file);
    12. QObject::connect(&http, SIGNAL(done(bool)), &app, SLOT(quit()));
    13.  
    14. int res = app.exec();
    15. qDebug() << file.size();
    16. return res;
    17. }
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

Similar Threads

  1. new QHttp() Error
    By fengtian.we in forum Qt Programming
    Replies: 7
    Last Post: 6th October 2010, 17:56
  2. QHttp download file problem.
    By fengtian.we in forum Qt Programming
    Replies: 12
    Last Post: 12th June 2007, 09:39
  3. QHttp & HTTP 1.1 Compression
    By bporter in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2007, 20:04
  4. how to use QHttp inside QThread in Qt3
    By alusuel in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2006, 11: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.