aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-11-26 11:04:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-11-26 11:04:21 +0000
commit05221e9056518beb648362d06a4e575bd0254f86 (patch)
tree5f07b979761b54396ab2ec44202a2e02770bfab7
parente963714de689c7e86bf8be3aa165317f56a21ea0 (diff)
test1015 --data-urlencode
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test101553
2 files changed, 54 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index ee0a05624..fe5c1c04b 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -46,7 +46,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test231 test1000 test1001 test1002 test1003 test1004 test1005 test1006 \
test615 test1007 test541 test1010 test1011 test1012 test542 test543 \
test536 test1008 test1009 test2000 test2001 test2002 test2003 test35 \
- test544 test545 test2004 test546 test1013 test1014
+ test544 test545 test2004 test546 test1013 test1014 test1015
filecheck:
@mkdir test-place; \
diff --git a/tests/data/test1015 b/tests/data/test1015
new file mode 100644
index 000000000..cb916fd17
--- /dev/null
+++ b/tests/data/test1015
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+--data-urlencode
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 I am cool swsclose
+Server: Cool server/10.0
+Content-Length: 0
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--data-urlencode
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1015 --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@log/1015.txt" --data-urlencode @log/1015.txt
+</command>
+<file name="log/1015.txt">
+content to _?!#$'|<>
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /1015 HTTP/1.1
+User-Agent: curl/7.17.2-CVS (i686-pc-linux-gnu) libcurl/7.17.2-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.5.2-CVS libidn/1.1 libssh2/0.19.0-C
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 141
+Content-Type: application/x-www-form-urlencoded
+
+my%20name%20is%20moo%5B%5D&y e s=s%5Fi%5Fr&v_alue=content%20to%20%5F%3F%21%23%24%27%7C%3C%3E%0A&content%20to%20%5F%3F%21%23%24%27%7C%3C%3E%0A
+</protocol>
+</verify>
+</testcase>