/*************************************************************
* Resolve the name of the server or proxy
*************************************************************/
- if(conn->bits.reuse) {
- /* We're reusing the connection - no need to resolve anything */
+ if(conn->bits.reuse)
+ /* We're reusing the connection - no need to resolve anything, and
+ fix_hostname() was called already in create_conn() for the re-use
+ case. */
*async = FALSE;
- if(conn->bits.proxy)
- fix_hostname(data, conn, &conn->host);
- }
else {
/* this is a fresh connect */
int rc;
free(conn); /* we don't need this anymore */
conn = conn_temp;
*in_connect = conn;
+
+ /* set a pointer to the hostname we display */
+ fix_hostname(data, conn, &conn->host);
+
infof(data, "Re-using existing connection! (#%ld) with host %s\n",
conn->connectindex,
conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
# Server-side
<reply>
<data>
-HTTP/1.1 301 OK swsclose\r
+HTTP/1.1 301 OK\r
Location: moo.html&testcase=/10110002\r
Date: Thu, 09 Nov 2010 14:49:00 GMT\r
-Connection: close\r
+Content-Length: 0\r
\r
</data>
<data2>
body
</data2>
<datacheck>
-HTTP/1.1 301 OK swsclose\r
+HTTP/1.1 301 OK\r
Location: moo.html&testcase=/10110002\r
Date: Thu, 09 Nov 2010 14:49:00 GMT\r
-Connection: close\r
+Content-Length: 0\r
\r
HTTP/1.1 200 OK swsclose
Location: this should be ignored