# url_match_destination() / Curl_peer_same_destination() require matching # origin hostname and port. Different Host names that resolve to the same # address must not share a connection. Both connections may stay in the # pool until process exit, so the server may see two DISCONNECT events only # at the end; num_connects proves a new connection was opened. HTTP HTTP GET --resolve connection reuse --next HTTP/1.1 200 OK Date: Tue, 09 Nov 2010 14:49:00 GMT Content-Length: 3 Content-Type: text/plain H1 HTTP/1.1 200 OK Date: Tue, 09 Nov 2010 14:49:00 GMT Content-Length: 3 Content-Type: text/plain H2 connection-monitor http HTTP connection not reused when target host changes http://host-a.example.test:%HTTPPORT/%TESTNUMBER --resolve host-a.example.test:%HTTPPORT:%HOSTIP -o %LOGDIR/3225-1 -w "connects=%{num_connects}/" --next http://host-b.example.test:%HTTPPORT/%TESTNUMBER0001 --resolve host-b.example.test:%HTTPPORT:%HOSTIP -o %LOGDIR/3225-2 -w "connects=%{num_connects}/" GET /%TESTNUMBER HTTP/1.1 Host: host-a.example.test:%HTTPPORT User-Agent: curl/%VERSION Accept: */* GET /%TESTNUMBER0001 HTTP/1.1 Host: host-b.example.test:%HTTPPORT User-Agent: curl/%VERSION Accept: */* [DISCONNECT] [DISCONNECT] # Same IP via --resolve, different Host names => new connection each time. connects=1/connects=1/