test1287 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. proxytunnel
  8. verbose logs
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply>
  14. <data>
  15. HTTP/1.1 200 OK
  16. Date: Thu, 09 Nov 2010 14:49:00 GMT
  17. Server: test-server/fake swsclose
  18. Content-Type: text/html
  19. Funny-head: yesyes
  20. Content-Length: 9
  21. contents
  22. </data>
  23. # The purpose of this test is to make sure curl ignores headers
  24. # Content-Length and Transfer-Encoding in a successful CONNECT 2xx reply.
  25. <connect>
  26. HTTP/1.1 200 Mighty fine indeed
  27. Content-Length: 123
  28. Transfer-Encoding: chunked
  29. </connect>
  30. <datacheck>
  31. HTTP/1.1 200 Mighty fine indeed
  32. Content-Length: 123
  33. Transfer-Encoding: chunked
  34. HTTP/1.1 200 OK
  35. Date: Thu, 09 Nov 2010 14:49:00 GMT
  36. Server: test-server/fake swsclose
  37. Content-Type: text/html
  38. Funny-head: yesyes
  39. Content-Length: 9
  40. contents
  41. </datacheck>
  42. </reply>
  43. #
  44. # Client-side
  45. <client>
  46. <server>
  47. http
  48. http-proxy
  49. </server>
  50. <name>
  51. HTTP over proxy-tunnel ignore TE and CL in CONNECT 2xx responses
  52. </name>
  53. <command>
  54. -v --proxytunnel -x %HOSTIP:%PROXYPORT http://test.1287:%HTTPPORT/we/want/that/page/1287
  55. </command>
  56. </client>
  57. #
  58. # Verify data after the test has been "shot"
  59. <verify>
  60. <strip>
  61. ^User-Agent:.*
  62. </strip>
  63. <proxy>
  64. CONNECT test.1287:%HTTPPORT HTTP/1.1
  65. Host: test.1287:%HTTPPORT
  66. Proxy-Connection: Keep-Alive
  67. </proxy>
  68. <protocol>
  69. GET /we/want/that/page/1287 HTTP/1.1
  70. Host: test.1287:%HTTPPORT
  71. Accept: */*
  72. </protocol>
  73. <file name="log/stderr1287" mode="text">
  74. * Ignoring Content-Length in CONNECT 200 response
  75. * Ignoring Transfer-Encoding in CONNECT 200 response
  76. </file>
  77. <stripfile>
  78. s/^.*(?=\* Ignoring (?:Content-Length|Transfer-Encoding) )// or $_ = ''
  79. </stripfile>
  80. </verify>
  81. </testcase>