test1015 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <testcase>
  2. <info>
  3. <keywords>
  4. --data-urlencode
  5. </keywords>
  6. </info>
  7. #
  8. # Server-side
  9. <reply>
  10. <data>
  11. HTTP/1.1 200 I am cool swsclose
  12. Server: Cool server/10.0
  13. Content-Length: 0
  14. </data>
  15. </reply>
  16. #
  17. # Client-side
  18. <client>
  19. <server>
  20. http
  21. </server>
  22. <name>
  23. --data-urlencode
  24. </name>
  25. <command>
  26. 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
  27. </command>
  28. <file name="log/1015.txt">
  29. content to _?!#$'|<>
  30. </file>
  31. </client>
  32. #
  33. # Verify data after the test has been "shot"
  34. <verify>
  35. <strip>
  36. ^User-Agent:.*
  37. </strip>
  38. <protocol nonewline="yes">
  39. POST /1015 HTTP/1.1
  40. 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
  41. Host: %HOSTIP:%HTTPPORT
  42. Accept: */*
  43. Content-Length: 133
  44. Content-Type: application/x-www-form-urlencoded
  45. my%20name%20is%20moo%5B%5D&y e s=s_i_r&v_alue=content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A&content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A
  46. </protocol>
  47. </verify>
  48. </testcase>