PDA

View Full Version : maybe QHttp question



LMZ
7th June 2007, 17:12
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 =).

jpn
8th June 2007, 08:32
Could you, by any chance, prepare a minimal compilable example reproducing the problem?

LMZ
8th June 2007, 10:25
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)

jpn
9th June 2007, 14:12
Try this: http://www.cs.tut.fi/~nurmi22/libClipMD.so



#include <QtCore>
#include <QtNetwork>
#include <QtDebug>

int main(int argc, char* argv[])
{
QCoreApplication app(argc, argv);

QFile file("plugin.so");
QHttp http("www.cs.tut.fi");
http.get("/~nurmi22/libClipMD.so", &file);
QObject::connect(&http, SIGNAL(done(bool)), &app, SLOT(quit()));

int res = app.exec();
qDebug() << file.size();
return res;
}