aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2006-04-13 07:00:24 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2006-04-13 07:00:24 +0000
commite8650bbf16fe46a482d98c99399312abb960a1aa (patch)
tree5ca5dabeccd8da0e0d75a16f454a8841640d4e2d
parentbe57b387d2394cc670b37e04edab41e293d47560 (diff)
downloadluasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.tar.gz
luasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.tar.bz2
luasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.zip
http.request was using old host header during redirects.
-rw-r--r--FIX1
-rw-r--r--NEW3
-rw-r--r--doc/index.html2
-rw-r--r--src/http.lua2
4 files changed, 7 insertions, 1 deletions
diff --git a/FIX b/FIX
index 84504f0..a688ba0 100644
--- a/FIX
+++ b/FIX
@@ -1,3 +1,4 @@
1http was preserving old host header during redirects
1fix smtp.send hang on source error 2fix smtp.send hang on source error
2add create field to FTP and SMTP and fix HTTP ugliness 3add create field to FTP and SMTP and fix HTTP ugliness
3clean timeout argument to open functions in SMTP, HTTP and FTP 4clean timeout argument to open functions in SMTP, HTTP and FTP
diff --git a/NEW b/NEW
index f6210b2..bc9ba2c 100644
--- a/NEW
+++ b/NEW
@@ -14,6 +14,9 @@ This is just a bug-fix/update release.
14 * Improved: http.request is robust to evil servers that 14 * Improved: http.request is robust to evil servers that
15 send inappropriate 100-continue messages (David Burgess); 15 send inappropriate 100-continue messages (David Burgess);
16 16
17 * Fixed: http.request was using the old host header during
18 redirects (Florian Berger);
19
17 * Fixed: sample unix.c had fallen through the cracks 20 * Fixed: sample unix.c had fallen through the cracks
18 during development (Matthew Percival); 21 during development (Matthew Percival);
19 22
diff --git a/doc/index.html b/doc/index.html
index d5a1f30..3c0bbce 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -172,6 +172,8 @@ header (William Trenker);
172<li> Improved: <tt>http.request</tt> is robust to evil 172<li> Improved: <tt>http.request</tt> is robust to evil
173servers that send inappropriate 100-continue messages 173servers that send inappropriate 100-continue messages
174(David Burgess); 174(David Burgess);
175<li> Fixed: <tt>http.request</tt> was using the old host header during
176redirects (Florian Berger);
175<li> Fixed: sample <tt>unix.c</tt> had fallen through the 177<li> Fixed: sample <tt>unix.c</tt> had fallen through the
176cracks during development (Matthew Percival); 178cracks during development (Matthew Percival);
177<li> Fixed: error code was not being propagated correctly in 179<li> Fixed: error code was not being propagated correctly in
diff --git a/src/http.lua b/src/http.lua
index 6465c29..558f347 100644
--- a/src/http.lua
+++ b/src/http.lua
@@ -261,7 +261,7 @@ function tredirect(reqt, location)
261 local result, code, headers, status = trequest { 261 local result, code, headers, status = trequest {
262 -- the RFC says the redirect URL has to be absolute, but some 262 -- the RFC says the redirect URL has to be absolute, but some
263 -- servers do not respect that 263 -- servers do not respect that
264 url = url.absolute(reqt, location), 264 url = url.absolute(reqt.url, location),
265 source = reqt.source, 265 source = reqt.source,
266 sink = reqt.sink, 266 sink = reqt.sink,
267 headers = reqt.headers, 267 headers = reqt.headers,