[vlc-commits] demux: adaptive: pass full url to proxy

Francois Cartegnie git at videolan.org
Fri Feb 2 14:47:19 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan 31 23:09:26 2018 +0100| [e5a3e37f9a420ee0dd74398f7c6a94d353a44079] | committer: Thomas Guillem

demux: adaptive: pass full url to proxy

as reported by Ramon GabarrĂ³

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5a3e37f9a420ee0dd74398f7c6a94d353a44079
---

 modules/demux/adaptive/http/HTTPConnection.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp
index bdc109350f..971f0c84a7 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -139,8 +139,13 @@ int HTTPConnection::request(const std::string &path, const BytesRange &range)
     msg_Dbg(p_object, "Retrieving %s @%zu", params.getUrl().c_str(),
                        range.isValid() ? range.getStartByte() : 0);
 
+    std::string querypath;
     if(!proxyparams.getHostname().empty())
+    {
         msg_Dbg(p_object, "Using proxy %s", proxyparams.getUrl().c_str());
+        querypath = params.getUrl();
+    }
+    else querypath = path;
 
     if(!connected() && ( params.getHostname().empty() || !connect() ))
         return VLC_EGENERIC;
@@ -149,7 +154,7 @@ int HTTPConnection::request(const std::string &path, const BytesRange &range)
     if(range.isValid() && range.getEndByte() > 0)
         contentLength = range.getEndByte() - range.getStartByte() + 1;
 
-    std::string header = buildRequestHeader(path);
+    std::string header = buildRequestHeader(querypath);
     if(connectionClose)
         header.append("Connection: close\r\n");
     header.append("\r\n");



More information about the vlc-commits mailing list