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

Francois Cartegnie git at videolan.org
Fri Feb 2 13:36:37 CET 2018


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

demux: adaptive: pass full url to proxy

as reported by Ramon GabarrĂ³

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

 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..67f20b8c51 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);
 
+    const 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