diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-12-10 22:13:04 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-12-10 22:13:04 +0000 |
commit | 1ea522dd46db470dc59b3bdb09ffc72a32ef1d73 (patch) | |
tree | 7ef6eb94c4df3de783843ba5d08318fbc188624d /net/http.lua | |
parent | cc9e756839f716de96d1bf95e4cd1eded8046a3d (diff) | |
download | prosody-1ea522dd46db470dc59b3bdb09ffc72a32ef1d73.tar.gz prosody-1ea522dd46db470dc59b3bdb09ffc72a32ef1d73.zip |
net.http: Don't expect the body on redirects
Diffstat (limited to 'net/http.lua')
-rw-r--r-- | net/http.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |