[Interest] Can't download file with QNetworkAccessManager: "connection closed"

Nikos Chantziaras realnc at gmail.com
Sun Jun 8 12:38:10 CEST 2014


On 08/06/14 07:48, Thiago Macieira wrote:
> Em dom 08 jun 2014, às 06:05:20, Nikos Chantziaras escreveu:
>> It fails even without the redirection. I only used "sf.net" instead of
>> "sourceforge.net" in order to make the code smaller for posting here. So
>> this will also fail:
>>
>>     QNetworkRequest request(QUrl("http://qtads.sourceforge.net/COPYING"));
>
> I can reproduce it here. Traffic sniffing and strace reveal it's a server bug. The
> server closed the connection.
>[...]
> $ curl -A Mozilla/5.0 http://qtads.sourceforge.net/COPYING
> curl: (56) Recv failure: Connection reset by peer
>
> Like I said, server bug.

Thanks, Thiago. It seems Mozilla/5.0 is the only user-agent this happens 
with. Could it be that there's some reason to reject connections with 
that user-agent? If yes, it might be a good idea to change the default 
user-agent set by Qt.

I reported this in SF's tracker:

   https://sourceforge.net/p/forge/site-support/7857/




More information about the Interest mailing list