[Interest] Adding 'raw' queries to a QUrlQuery

Guido Seifert wargand at gmx.de
Sun Aug 25 16:43:22 CEST 2013

> You can also just cherry-pick the changes into 5.1.

Thanks, Thiago, but this is only half as much fun. :-)

So I did checkout dev 5.2. And the new QUrl works like a charm. BUT... there is always a but. I am still not happy. The reason why the trackers did not recognize the info_hash was not the info_hash. I cursed quite a lot, when I finally got the percentencoding right, but the tracker response did not change.

What I discovered: The QNetWorkRequest adds automatically 'stuff' to the header, e.g.  "User-Agent: Mozilla/5.0". Hey? I am not Mozilla/5.0. Where does this come from?

When I did:
QNetworkRequest req;
req.setRawHeader("User-Agent","Something other");

The tracker was happy and started serving. And again: Same problem with examples/network/torrent.

I think if QNetworkAccessManager and related classes are supposed to be the main handlers to send and receive network traffic, it must be possible to have 100% control over every single bit, which goes over the line.

Or do I overlook something? I admit, I did not search the Qt 5.2 docs for the newest changes.


More information about the Interest mailing list