test1288 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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: Tue, 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.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
  41. </command>
  42. <features>
  43. proxy
  44. </features>
  45. </client>
  46. #
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <proxy>
  50. CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1
  51. Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
  52. User-Agent: curl/%VERSION
  53. Proxy-Connection: Keep-Alive
  54. </proxy>
  55. <protocol>
  56. GET /we/want/that/page/%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
  58. User-Agent: curl/%VERSION
  59. Accept: */*
  60. </protocol>
  61. # This test is structured to test all the expectations of
  62. # --suppress-connect-headers, which are:
  63. # Must suppress in --include and --dump-header
  64. # Must not suppress in --verbose and --trace
  65. # Must not suppress in statistics (eg received header byte total)
  66. <stdout>
  67. HTTP/1.1 200 OK
  68. HTTP/1.1 200 OK
  69. Date: Tue, 09 Nov 2010 14:49:00 GMT
  70. Date: Tue, 09 Nov 2010 14:49:00 GMT
  71. Server: test-server/fake
  72. Server: test-server/fake
  73. Content-Type: text/html
  74. Content-Type: text/html
  75. Funny-head: yesyes
  76. Funny-head: yesyes
  77. Content-Length: 9
  78. Content-Length: 9
  79. Connection: keep-alive
  80. Connection: keep-alive
  81. contents
  82. CONNECT CODE: 200
  83. RECEIVED HEADER BYTE TOTAL: 231
  84. </stdout>
  85. </verify>
  86. </testcase>