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

Nikos Chantziaras realnc at gmail.com
Mon Jun 9 20:49:33 CEST 2014


On 08/06/14 15:03, Thiago Macieira wrote:
> Em dom 08 jun 2014, às 13:38:10, Nikos Chantziaras escreveu:
>>> 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?
>
> No. Most likely, the server is trying to do something based on what browser
> you're using and the script crashes if you send just Mozilla/5.0.

Turns out they're blocking this intentionally. Their reply was:

"This is known and intentional. We specifically block that because of 
abuse that has come from that user-agent (being default also means that 
malicious behavior often uses that user-agent as well). You should set 
the user-agent to be something that includes your project name and/or 
URL so we know who to contact if we start to notice abusive behavior 
from your software."

Perhaps Qt should add something to the user-agent string. Maybe:

   Mozilla/5.0 Qt/x.y.z




More information about the Interest mailing list