test95 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP CONNECT
  7. proxytunnel
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 200 OK
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Server: test-server/fake swsclose
  17. Content-Type: text/html
  18. Funny-head: yesyes
  19. Content-Length: 9
  20. contents
  21. </data>
  22. <connect>
  23. HTTP/1.1 200 Mighty fine indeed
  24. </connect>
  25. <datacheck>
  26. HTTP/1.1 200 Mighty fine indeed
  27. HTTP/1.1 200 OK
  28. Date: Tue, 09 Nov 2010 14:49:00 GMT
  29. Server: test-server/fake swsclose
  30. Content-Type: text/html
  31. Funny-head: yesyes
  32. Content-Length: 9
  33. contents
  34. </datacheck>
  35. </reply>
  36. #
  37. # Client-side
  38. <client>
  39. <server>
  40. http
  41. http-proxy
  42. </server>
  43. <name>
  44. HTTP over proxytunnel using POST
  45. </name>
  46. <command>
  47. http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
  48. </command>
  49. <features>
  50. proxy
  51. </features>
  52. </client>
  53. #
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <proxy>
  57. CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1
  58. Host: test.%TESTNUMBER:%HTTPPORT
  59. User-Agent: curl/%VERSION
  60. Proxy-Connection: Keep-Alive
  61. </proxy>
  62. <protocol nonewline="yes">
  63. POST /we/want/that/page/%TESTNUMBER HTTP/1.1
  64. Host: test.%TESTNUMBER:%HTTPPORT
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. Content-Length: 27
  68. Content-Type: application/x-www-form-urlencoded
  69. datatopost=ohthatsfunyesyes
  70. </protocol>
  71. </verify>
  72. </testcase>