test95 1.4 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: Thu, 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: Thu, 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.95:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
  48. </command>
  49. </client>
  50. #
  51. # Verify data after the test has been "shot"
  52. <verify>
  53. <strip>
  54. ^User-Agent:.*
  55. </strip>
  56. <proxy>
  57. CONNECT test.95:%HTTPPORT HTTP/1.1
  58. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  59. Host: test.95:%HTTPPORT
  60. Proxy-Connection: Keep-Alive
  61. </proxy>
  62. <protocol nonewline="yes">
  63. POST /we/want/that/page/95 HTTP/1.1
  64. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  65. Host: test.95:%HTTPPORT
  66. Accept: */*
  67. Content-Length: 27
  68. Content-Type: application/x-www-form-urlencoded
  69. datatopost=ohthatsfunyesyes
  70. </protocol>
  71. </verify>
  72. </testcase>