test1134: verify CREDSPERREQUEST for HTTP

Verifies that the change in 68f0166a92 works as intended and that
different HTTP auth credentials to the same host still re-uses the
connection properly.
This commit is contained in:
Daniel Stenberg 2014-05-18 16:55:03 +02:00
parent 7c0e67c8c2
commit 313b274b9d
2 changed files with 66 additions and 1 deletions

View File

@ -97,7 +97,7 @@ test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 \
\
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \

65
tests/data/test1134 Normal file
View File

@ -0,0 +1,65 @@
<testcase>
<info>
<keywords>
HTTP
HTTP HEAD
-G
</keywords>
</info>
#
# Server-side
<reply>
<servercmd>
connection-monitor
</servercmd>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 10
contents1
</data>
<data1>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 10
contents2
</data1>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
HTTP connection re-use with different credentials
</name>
<command>
http://%HOSTIP:%HTTPPORT/1134 -u user1:password1 --next http://%HOSTIP:%HTTPPORT/11340001 -u 2user:password2
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1134 HTTP/1.1
Authorization: Basic dXNlcjE6cGFzc3dvcmQx
Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /11340001 HTTP/1.1
Authorization: Basic MnVzZXI6cGFzc3dvcmQy
Host: %HOSTIP:%HTTPPORT
Accept: */*
[DISCONNECT]
</protocol>
</verify>
</testcase>