test498 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data nocheck="yes">
  12. HTTP/1.1 301 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  16. ETag: "21025-dc7-39462498"
  17. Accept-Ranges: bytes
  18. Content-Length: 6
  19. Location: /
  20. Connection: close
  21. Content-Type: text/html
  22. %repeat[1700 x Repeat-this-Header-a-large-number-of-times: Dorothy lived in the midst of the great Kansas prairies, with Uncle Henry, who was a farmer, and Aunt Em, who was the farmer’s wife.%0a]%
  23. -foo-
  24. </data>
  25. </reply>
  26. #
  27. # Client-side
  28. <client>
  29. <server>
  30. http
  31. </server>
  32. <name>
  33. Reject too large HTTP response headers on endless redirects
  34. </name>
  35. <command>
  36. http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-redir 400 --location
  37. </command>
  38. </client>
  39. #
  40. # Verify data after the test has been "shot"
  41. <verify>
  42. # curl: (56) Too large response headers: 6144086 > 6144000
  43. # hyper returns a generic error that libcurl converts to an even more
  44. # generic error
  45. <errorcode>
  46. %if hyper
  47. 1
  48. %else
  49. 56
  50. %endif
  51. </errorcode>
  52. </verify>
  53. </testcase>