projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f5cf37
)
httpclient: fix logic error for redirects
author
Manuel Munz
<munz@comuno.net>
Thu, 16 Oct 2014 10:22:49 +0000
(12:22 +0200)
committer
Manuel Munz
<munz@comuno.net>
Thu, 16 Oct 2014 10:22:49 +0000
(12:22 +0200)
libs/httpclient/luasrc/httpclient.lua
patch
|
blob
|
history
diff --git
a/libs/httpclient/luasrc/httpclient.lua
b/libs/httpclient/luasrc/httpclient.lua
index c866be6855cc59dc1e7409dec42fa54e10a8db92..e9fec5dbbbe334c6134da94769e5ff0db38b70db 100644
(file)
--- 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