I have a weird problem. I am unable to download a file from a specific server (ran by sourceforge) using QNetworkAccessManager and QNetworkRequest. Example:
this->fNetManager = new QNetworkAccessManager(this); connect(this->fNetManager, SIGNAL(finished(QNetworkReply*)), SLOT(fReplyFinished(QNetworkReply*))); QNetworkRequest request(QUrl("http://qtads.sf.net/COPYING")); this->fReply = this->fNetManager->get(request); connect(this->fReply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(fErrorOccurred(QNetworkReply::NetworkError))); The fReplyFinished() slot: void Foo::fReplyFinished(QNetworkReply* reply) { if (reply->error() != QNetworkReply::NoError) { qDebug() << this->fReply->errorString()l return; } } This result in: Connection closed being printed. It's impossible to download the file. If I use another server (something not hosted by SourceForge), all is fine. Using wget: wget http://qtads.sf.net/COPYING works just fine. Using a simple Python program: import urllib2 response = urllib2.urlopen('http://qtads.sf.net/COPYING') html = response.read() also works just fine. The only one not able to fetch the file, is Qt. Any ideas on why this fails? I'm on Qt 4.8.5, on Gentoo Linux AMD64. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest