From 1ea522dd46db470dc59b3bdb09ffc72a32ef1d73 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 10 Dec 2009 22:13:04 +0000 Subject: net.http: Don't expect the body on redirects --- net/http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/http.lua b/net/http.lua index 9d2f9b96..67da59de 100644 --- a/net/http.lua +++ b/net/http.lua @@ -30,7 +30,7 @@ function urldecode(s) return s and (s:gsub("%%(%x%x)", function (c) return char( local function expectbody(reqt, code) if reqt.method == "HEAD" then return nil end - if code == 204 or code == 304 then return nil end + if code == 204 or code == 304 or code == 301 then return nil end if code >= 100 and code < 200 then return nil end return 1 end -- cgit v1.2.3