From cd4fa227cccab39fcee6c7590cc7b21cdf70f8e9 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 30 Apr 2009 12:58:04 +0000 Subject: [PATCH] httpclient: Send the correct Host-Header if we are following a redirect --- libs/httpclient/luasrc/httpclient.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/httpclient/luasrc/httpclient.lua b/libs/httpclient/luasrc/httpclient.lua index 4f9559310..69abddff3 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) -- 2.25.1