keep query encoding when HTTP Proxy is used
authorAlexander Trufanov <trufanovan@gmail.com>
Tue, 21 Mar 2017 13:51:32 +0000 (16:51 +0300)
committerMaximiliano Curia <maxy@debian.org>
Wed, 5 Apr 2017 08:10:59 +0000 (09:10 +0100)
REVIEW:130040

Otherwise some '%XX' parts of url query might be converted back to ASCII and this cause problems while passing info_hash to torrent trackers. Detailed description is in review.

Gbp-Pq: Name keep-query-encoding-when-HTTP-Proxy-is-used.patch

src/ioslaves/http/http.cpp

index 62eb09d2882097c3dea99ea73fd1933cea4376a7..0ea501d8e6324dd7e1137dd88ec2377af99e1901 100644 (file)
@@ -2322,7 +2322,7 @@ QString HTTPProtocol::formatRequestUri() const
         u.setPort(m_request.url.port());
         u.setPath(m_request.url.path(QUrl::FullyEncoded));
         u.setQuery(m_request.url.query(QUrl::FullyEncoded));
-        return u.toString();
+        return u.toString(QUrl::FullyEncoded);
     } else {
         QString result = m_request.url.path(QUrl::FullyEncoded);
         if (m_request.url.hasQuery()) {