diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-13 07:00:24 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-13 07:00:24 +0000 |
| commit | e8650bbf16fe46a482d98c99399312abb960a1aa (patch) | |
| tree | 5ca5dabeccd8da0e0d75a16f454a8841640d4e2d | |
| parent | be57b387d2394cc670b37e04edab41e293d47560 (diff) | |
| download | luasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.tar.gz luasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.tar.bz2 luasocket-e8650bbf16fe46a482d98c99399312abb960a1aa.zip | |
http.request was using old host header during redirects.
| -rw-r--r-- | FIX | 1 | ||||
| -rw-r--r-- | NEW | 3 | ||||
| -rw-r--r-- | doc/index.html | 2 | ||||
| -rw-r--r-- | src/http.lua | 2 |
4 files changed, 7 insertions, 1 deletions
| @@ -1,3 +1,4 @@ | |||
| 1 | http was preserving old host header during redirects | ||
| 1 | fix smtp.send hang on source error | 2 | fix smtp.send hang on source error |
| 2 | add create field to FTP and SMTP and fix HTTP ugliness | 3 | add create field to FTP and SMTP and fix HTTP ugliness |
| 3 | clean timeout argument to open functions in SMTP, HTTP and FTP | 4 | clean timeout argument to open functions in SMTP, HTTP and FTP |
| @@ -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 |
| 173 | servers that send inappropriate 100-continue messages | 173 | servers 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 | ||
| 176 | redirects (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 |
| 176 | cracks during development (Matthew Percival); | 178 | cracks 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, |
