test95 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. <datacheck>
  23. HTTP/1.1 200 Mighty fine indeed
  24. HTTP/1.1 200 OK
  25. Date: Thu, 09 Nov 2010 14:49:00 GMT
  26. Server: test-server/fake swsclose
  27. Content-Type: text/html
  28. Funny-head: yesyes
  29. Content-Length: 9
  30. contents
  31. </datacheck>
  32. </reply>
  33. #
  34. # Client-side
  35. <client>
  36. <server>
  37. http
  38. http-proxy
  39. </server>
  40. <name>
  41. HTTP over proxytunnel using POST
  42. </name>
  43. <command>
  44. http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
  45. </command>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <strip>
  51. ^User-Agent:.*
  52. </strip>
  53. <proxy>
  54. CONNECT %HOSTIP:%HTTPPORT HTTP/1.1
  55. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  56. Host: %HOSTIP:%HTTPPORT
  57. Proxy-Connection: Keep-Alive
  58. </proxy>
  59. <protocol nonewline="yes">
  60. POST /we/want/that/page/95 HTTP/1.1
  61. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  62. Host: %HOSTIP:%HTTPPORT
  63. Accept: */*
  64. Content-Length: 27
  65. Content-Type: application/x-www-form-urlencoded
  66. datatopost=ohthatsfunyesyes
  67. </protocol>
  68. </verify>
  69. </testcase>