test1288 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. proxytunnel
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply>
  14. <connect>
  15. HTTP/1.1 200 Mighty fine indeed
  16. Server: test tunnel 2000
  17. </connect>
  18. <data nocheck="yes">
  19. HTTP/1.1 200 OK
  20. Date: Thu, 09 Nov 2010 14:49:00 GMT
  21. Server: test-server/fake
  22. Content-Type: text/html
  23. Funny-head: yesyes
  24. Content-Length: 9
  25. Connection: keep-alive
  26. contents
  27. </data>
  28. </reply>
  29. #
  30. # Client-side
  31. <client>
  32. <server>
  33. http
  34. http-proxy
  35. </server>
  36. <name>
  37. Suppress proxy CONNECT response headers
  38. </name>
  39. <command>
  40. --proxytunnel --suppress-connect-headers --dump-header - --include --write-out "\nCONNECT CODE: %{http_connect}\nRECEIVED HEADER BYTE TOTAL: %{size_header}\n" --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.1288:%HTTPPORT/we/want/that/page/1288
  41. </command>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <strip>
  47. ^User-Agent:.*
  48. </strip>
  49. <proxy>
  50. CONNECT %HOSTIP.1288:%HTTPPORT HTTP/1.1
  51. Host: %HOSTIP.1288:%HTTPPORT
  52. Proxy-Connection: Keep-Alive
  53. </proxy>
  54. <protocol>
  55. GET /we/want/that/page/1288 HTTP/1.1
  56. Host: %HOSTIP.1288:%HTTPPORT
  57. Accept: */*
  58. </protocol>
  59. # This test is structured to test all the expectations of
  60. # --suppress-connect-headers, which are:
  61. # Must suppress in --include and --dump-header
  62. # Must not suppress in --verbose and --trace
  63. # Must not suppress in statistics (eg received header byte total)
  64. <stdout>
  65. HTTP/1.1 200 OK
  66. HTTP/1.1 200 OK
  67. Date: Thu, 09 Nov 2010 14:49:00 GMT
  68. Date: Thu, 09 Nov 2010 14:49:00 GMT
  69. Server: test-server/fake
  70. Server: test-server/fake
  71. Content-Type: text/html
  72. Content-Type: text/html
  73. Funny-head: yesyes
  74. Funny-head: yesyes
  75. Content-Length: 9
  76. Content-Length: 9
  77. Connection: keep-alive
  78. Connection: keep-alive
  79. contents
  80. CONNECT CODE: 200
  81. RECEIVED HEADER BYTE TOTAL: 231
  82. </stdout>
  83. </verify>
  84. </testcase>