summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-25 22:57:18 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-25 22:57:18 +0000
commitded8dae503049a640c197c64705d33aaf669c062 (patch)
treee710501d6f5daff83b7eeaed2a16d78d96764342
parente7b9b7798d720e8c857dc9fe043a793d1d658fb0 (diff)
libs/httpclient: return server response line in error case (#249)
-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 aacc79a5b..93eed05c6 100644
--- a/libs/httpclient/luasrc/httpclient.lua
+++ b/libs/httpclient/luasrc/httpclient.lua
@@ -92,7 +92,7 @@ function request_to_source(uri, options)
if not status then
return status, response, buffer
elseif status ~= 200 and status ~= 206 then
- return nil, status, response
+ return nil, status, buffer
end
if response.headers["Transfer-Encoding"] == "chunked" then