vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Wed Jan 
31 23:09:26 2018 +0100| [a091c81949e91bae0ca9cdc2c6ece551312f5a38] | committer: 
Jean-Baptiste Kempf

demux: adaptive: pass full url to proxy

as reported by Ramon GabarrĂ³

(cherry picked from commit e5a3e37f9a420ee0dd74398f7c6a94d353a44079)
Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org>

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

 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");

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to