aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test58058
-rw-r--r--tests/libtest/lib507.c1
2 files changed, 59 insertions, 0 deletions
diff --git a/tests/data/test580 b/tests/data/test580
new file mode 100644
index 000000000..8256f0e2e
--- /dev/null
+++ b/tests/data/test580
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+Duplicate-header
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+Location: and there's a second one too! / moo.html
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib507
+</tool>
+
+ <name>
+multi interface, multiple Location: headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/580
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /580 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index 9707c9b07..012d8f454 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -48,6 +48,7 @@ int test(char *URL)
}
test_setopt(curls, CURLOPT_URL, URL);
+ test_setopt(curls, CURLOPT_HEADER, 1L);
if ((ret = curl_multi_add_handle(multi, curls)) != CURLM_OK) {
fprintf(stderr, "curl_multi_add_handle() failed, "