# HTTP has PROTOPT_CREDSPERREQUEST: Basic credentials are attached to the
# request, not to the connection for reuse matching. Different -u values
# therefore still reuse the idle connection (see also test1134). Protocols
# without CREDSPERREQUEST (and NTLM/Negotiate mid-handshake) refuse reuse.
# This test pins the HTTP Basic behavior with an explicit num_connects check.
HTTP
HTTP GET
HTTP Basic auth
connection reuse
--next
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 3
Content-Type: text/plain
A1
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 3
Content-Type: text/plain
B2
connection-monitor
http
HTTP connection reused across different Basic auth credentials
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u user1:password1 -o %LOGDIR/3224-1 -w "connects=%{num_connects}/" --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -u user2:password2 -o %LOGDIR/3224-2 -w "connects=%{num_connects}/"
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Authorization: Basic %b64[user1:password1]b64%
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Authorization: Basic %b64[user2:password2]b64%
User-Agent: curl/%VERSION
Accept: */*
[DISCONNECT]
connects=1/connects=0/