X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=net%2Fhttp.lua;h=9b1954da5dc113b87e8c45ee2fe7a377d7f90b28;hb=cb99e283ecb185cc7cd28f21d8c89b519c8c89b1;hp=34ec11b4f4ca45fc7493d2ae08745f5fbda76057;hpb=e3fe6639fa9e2416fe5ba9da6e939103718ee8ed;p=prosody.git diff --git a/net/http.lua b/net/http.lua index 34ec11b4..9b1954da 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