net.http: Don't expect the body on redirects

vault/0.11
Matthew Wild 16 years ago
parent 515b21547a
commit 883e2bd682
  1. 2
      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

Loading…
Cancel
Save