test508 933 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. POST
  6. POST callback
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 200 OK
  14. Date: Thu, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake swsclose
  16. Connection: close
  17. Content-Type: text/html
  18. hello
  19. </data>
  20. </reply>
  21. # Client-side
  22. <client>
  23. <server>
  24. http
  25. </server>
  26. # tool is what to use instead of 'curl'
  27. <tool>
  28. lib508
  29. </tool>
  30. <name>
  31. send HTTP POST using read callback
  32. </name>
  33. <command>
  34. http://%HOSTIP:%HTTPPORT/508
  35. </command>
  36. </client>
  37. #
  38. # Verify data after the test has been "shot"
  39. <verify>
  40. <strippart>
  41. # remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
  42. s/^(this is what we post to the silly web server)\r\n/$1\n/ if($has_charconv)
  43. </strippart>
  44. <protocol>
  45. POST /508 HTTP/1.1
  46. Host: %HOSTIP:%HTTPPORT
  47. Accept: */*
  48. Content-Length: 45
  49. Content-Type: application/x-www-form-urlencoded
  50. this is what we post to the silly web server
  51. </protocol>
  52. </verify>
  53. </testcase>