diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-08-08 13:49:35 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-08-08 13:57:56 +0200 |
commit | bf6dc61967c044e2d4fb695f651a8c728c421cb6 (patch) | |
tree | 84ac16396f6ec277b6e5705af1a5028907d8df8a /tests/data | |
parent | 1de496cf0f279ae27a46597408b5cbb360942eda (diff) |
verbose messages: fixed output of hostnames in re-used connections
I suspect this is a regression introduced in commit 207cf150, included
since 7.24.0.
Avoid showing '(nil)' as hostname in verbose output by making sure the
hostname fixup function is called early enough to set the pointers that
are used for this. The name data is set again for each request even for
re-used connections to handle multiple hostnames over the same
connection (like with proxy) or that the casing etc of the host name is
changed between requests (which has proven to be important at least once
in the past).
Test1011 was modified to use a redirect with a re-used a connection
since it then showed the bug and now lo longer does. There's currently
no easy way to have the test suite detect 'nil' texts in verbose ouputs
so no tests will detect if this problem gets reintroduced.
Bug: http://curl.haxx.se/mail/lib-2012-07/0111.html
Reported by: Gisle Vanem
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/test1011 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/data/test1011 b/tests/data/test1011 index 62ba074a1..59829c99c 100644 --- a/tests/data/test1011 +++ b/tests/data/test1011 @@ -10,10 +10,10 @@ followlocation # Server-side <reply> <data> -HTTP/1.1 301 OK swsclose
+HTTP/1.1 301 OK
Location: moo.html&testcase=/10110002
Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
+Content-Length: 0
</data> <data2> @@ -25,10 +25,10 @@ Connection: close body </data2> <datacheck> -HTTP/1.1 301 OK swsclose
+HTTP/1.1 301 OK
Location: moo.html&testcase=/10110002
Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
+Content-Length: 0
HTTP/1.1 200 OK swsclose Location: this should be ignored |