Permalink
Browse files

http.request was using old host header during redirects.

  • Loading branch information...
1 parent be57b38 commit e8650bbf16fe46a482d98c99399312abb960a1aa @diegonehab diegonehab committed Apr 13, 2006
Showing with 7 additions and 1 deletion.
  1. +1 −0 FIX
  2. +3 −0 NEW
  3. +2 −0 doc/index.html
  4. +1 −1 src/http.lua
View
@@ -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
View
@@ -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
@@ -172,6 +172,8 @@ <h2 id=new>What's New</h2>
<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
@@ -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,

0 comments on commit e8650bb

Please sign in to comment.