[vlc-commits] demux: adaptive: fix internal HTTP/1.0 handling (fix #17272)

Francois Cartegnie git at videolan.org
Mon Sep 5 17:43:59 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Sep  5 17:43:06 2016 +0200| [2896f0847901050483d34e952e9735761b72846d] | committer: Francois Cartegnie

demux: adaptive: fix internal HTTP/1.0 handling (fix #17272)

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

 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 1751bdd..4eda8e1 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -204,7 +204,12 @@ int HTTPConnection::parseReply()
         return VLC_EGENERIC;
 
     if (line.compare(0, 9, "HTTP/1.1 ")!=0)
-        return VLC_ENOOBJ;
+    {
+        if(line.compare(0, 9, "HTTP/1.0 ")!=0)
+            return VLC_ENOOBJ;
+        else
+            connectionClose = true;
+    }
 
     std::istringstream ss(line.substr(9));
     ss.imbue(std::locale("C"));



More information about the vlc-commits mailing list