test1015 989 B

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