libs/httpclient: return server response line in error case (#249)
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jun 2011 22:57:18 +0000 (22:57 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jun 2011 22:57:18 +0000 (22:57 +0000)
libs/httpclient/luasrc/httpclient.lua

index aacc79a..93eed05 100644 (file)
@@ -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