summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-05-18 16:55:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-05-18 16:55:03 +0200
commit313b274b9d60554217954939427f49337d7d4e9e (patch)
treeb0a3bc8ad333afe36aa64cac68ebc099d7be9dd7
parent7c0e67c8c2236760b1c54ab23442407e89f03a51 (diff)
downloadcurl-313b274b9d60554217954939427f49337d7d4e9e.tar.gz
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.
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test113465
2 files changed, 66 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 98aaee0e8..0a767b381 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -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 \
diff --git a/tests/data/test1134 b/tests/data/test1134
new file mode 100644
index 000000000..f8db6ebd2
--- /dev/null
+++ b/tests/data/test1134
@@ -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>