aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-12-10 22:13:04 +0000
committerMatthew Wild <mwild1@gmail.com>2009-12-10 22:13:04 +0000
commit1ea522dd46db470dc59b3bdb09ffc72a32ef1d73 (patch)
tree7ef6eb94c4df3de783843ba5d08318fbc188624d
parentcc9e756839f716de96d1bf95e4cd1eded8046a3d (diff)
downloadprosody-1ea522dd46db470dc59b3bdb09ffc72a32ef1d73.tar.gz
prosody-1ea522dd46db470dc59b3bdb09ffc72a32ef1d73.zip
net.http: Don't expect the body on redirects
-rw-r--r--net/http.lua2
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