summaryrefslogtreecommitdiffhomepage
path: root/libs/httpclient/luasrc
diff options
context:
space:
mode:
authorManuel Munz <munz@comuno.net>2014-10-16 12:22:49 +0200
committerManuel Munz <munz@comuno.net>2014-10-16 12:22:49 +0200
commit01033446638f06529be86149ff857f1238150c4c (patch)
tree37620beb4606fc7318f2610762bb7969e54881af /libs/httpclient/luasrc
parent3f5cf37da8025187c515a294a829d8b5426ca64d (diff)
httpclient: fix logic error for redirects
Diffstat (limited to 'libs/httpclient/luasrc')
-rw-r--r--libs/httpclient/luasrc/httpclient.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/httpclient/luasrc/httpclient.lua b/libs/httpclient/luasrc/httpclient.lua
index c866be685..e9fec5dbb 100644
--- a/libs/httpclient/luasrc/httpclient.lua
+++ b/libs/httpclient/luasrc/httpclient.lua
@@ -314,7 +314,7 @@ function request_raw(uri, options)
-- Follow
response.code = tonumber(status)
if response.code and options.depth > 0 then
- if response.code == 301 or response.code == 302 or response.code == 307
+ if (response.code == 301 or response.code == 302 or response.code == 307)
and response.headers.Location then
local nuri = response.headers.Location or response.headers.location
if not nuri then