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 | 883e2bd682e1ca418bb459ebf5804e126f8bfca1 (patch) | |
tree | d81d06cca96504a645cb65b8ec5c67c95b9ca49b | |
parent | 515b21547aa33c610e7ff835e9f4683a024f244d (diff) | |
download | prosody-883e2bd682e1ca418bb459ebf5804e126f8bfca1.tar.gz prosody-883e2bd682e1ca418bb459ebf5804e126f8bfca1.zip |
net.http: Don't expect the body on redirects
-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 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 |