summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-04-30 12:58:04 +0000
committerSteven Barth <steven@midlink.org>2009-04-30 12:58:04 +0000
commitcd4fa227cccab39fcee6c7590cc7b21cdf70f8e9 (patch)
tree61bc7f1a4b1d2225b02182ed017754ed2a187bb0 /libs
parent438180ead424ad61d2ad47c5f9d4b5da7ec4e1de (diff)
httpclient: Send the correct Host-Header if we are following a redirect
Diffstat (limited to 'libs')
-rw-r--r--libs/httpclient/luasrc/httpclient.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/httpclient/luasrc/httpclient.lua b/libs/httpclient/luasrc/httpclient.lua
index 4f95593103..69abddff32 100644
--- a/libs/httpclient/luasrc/httpclient.lua
+++ b/libs/httpclient/luasrc/httpclient.lua
@@ -303,6 +303,9 @@ function request_raw(uri, options)
end
options.depth = options.depth - 1
+ if options.headers then
+ options.headers.Host = nil
+ end
sock:close()
return request_raw(nuri, options)