aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test580
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-01-25 12:06:50 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-01-25 12:06:50 +0100
commitdbcaa0065719acc0383307f13d02d3d0c9b5c635 (patch)
treeba5429e85c29deb20b592350552744d3a8631963 /tests/data/test580
parent4b837a7e1541c151f6ea16fde92b6f57c5827d8a (diff)
downloadgnurl-dbcaa0065719acc0383307f13d02d3d0c9b5c635.tar.gz
gnurl-dbcaa0065719acc0383307f13d02d3d0c9b5c635.tar.bz2
gnurl-dbcaa0065719acc0383307f13d02d3d0c9b5c635.zip
HTTP: memory leak on multiple Location:
The HTTP parser allocated memory on each received Location: header without properly freeing old data. Starting now, the code only considers the first Location: header and will blissfully ignore subsequent ones. Bug: http://curl.haxx.se/bug/view.cgi?id=3165129 Reported by: Martin Lemke
Diffstat (limited to 'tests/data/test580')
-rw-r--r--tests/data/test58058
1 files changed, 58 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>