On 09/12/16 14:00, Andrew Shadura wrote:
> Since CloudFlare started forcing Transfer-Encoding: chunked
> on HTTP/1.1 connections, which VLSub doesn't support, it became
> impossible to download any subtitles.
> 
> Please consider fixing the LUA script with a patch I am going to
> attach to the follow-up email.

And here goes the patch.

-- 
Cheers,
  Andrew
Description: Force HTTP/1.0 when talking to opensubtitles.org
 OpenSubtitles is using CloudFlare who started using
 Transfer-Encoding: chunked with HTTP/1.1, which VLSub doesn't
 yet support. Forcing HTTP/1.0 should prevent VLSub from hanging
 when talking to OpenSubtitles.
Bug-Debian: 847559
Origin: upstream
Forwarded: yes, https://github.com/exebetche/vlsub/issues/143

--- a/share/lua/extensions/VLSub.lua
+++ b/share/lua/extensions/VLSub.lua
@@ -1189,7 +1189,7 @@
     local request = "<?xml version='1.0'?>"..dump_xml(reqTable)
     local host, path = parse_url(openSub.conf.url)		
     local header = {
-      "POST "..path.." HTTP/1.1", 
+      "POST "..path.." HTTP/1.0", 
       "Host: "..host, 
       "User-Agent: "..openSub.conf.userAgentHTTP, 
       "Content-Type: text/xml", 
@@ -1840,7 +1840,7 @@
 function get(url)
   local host, path = parse_url(url)
   local header = {
-    "GET "..path.." HTTP/1.1", 
+    "GET "..path.." HTTP/1.0", 
     "Host: "..host, 
     "User-Agent: "..openSub.conf.userAgentHTTP,
     "",

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to