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

1
FIX
View File

@ -1,3 +1,4 @@
http was preserving old host header during redirects
fix smtp.send hang on source error
add create field to FTP and SMTP and fix HTTP ugliness
clean timeout argument to open functions in SMTP, HTTP and FTP

3
NEW
View File

@ -14,6 +14,9 @@ This is just a bug-fix/update release.
* Improved: http.request is robust to evil servers that
send inappropriate 100-continue messages (David Burgess);
* Fixed: http.request was using the old host header during
redirects (Florian Berger);
* Fixed: sample unix.c had fallen through the cracks
during development (Matthew Percival);

View File

@ -172,6 +172,8 @@ header (William Trenker);
<li> Improved: <tt>http.request</tt> is robust to evil
servers that send inappropriate 100-continue messages
(David Burgess);
<li> Fixed: <tt>http.request</tt> was using the old host header during
redirects (Florian Berger);
<li> Fixed: sample <tt>unix.c</tt> had fallen through the
cracks during development (Matthew Percival);
<li> Fixed: error code was not being propagated correctly in

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,