# HG changeset patch # User Matthew Wild # Date 1260483184 0 # Node ID a0ea72846b46a964cfc92d155e5518c99f5f31c9 # Parent bdca5025fb46cc6367ac79f28ee333f61be7db12 net.http: Don't expect the body on redirects diff -r bdca5025fb46 -r a0ea72846b46 net/http.lua --- a/net/http.lua Thu Dec 10 16:52:08 2009 +0500 +++ b/net/http.lua Thu Dec 10 22:13:04 2009 +0000 @@ -30,7 +30,7 @@ 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