http.request was using old host header during redirects.

This commit is contained in:
Diego Nehab 2006-04-13 07:00:24 +00:00
parent be57b387d2
commit e8650bbf16
4 changed files with 7 additions and 1 deletions

View file

@ -261,7 +261,7 @@ function tredirect(reqt, location)
local result, code, headers, status = trequest {
-- the RFC says the redirect URL has to be absolute, but some
-- servers do not respect that
url = url.absolute(reqt, location),
url = url.absolute(reqt.url, location),
source = reqt.source,
sink = reqt.sink,
headers = reqt.headers,