test663 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <testcase>
  2. #
  3. # This test is crafted to reproduce oss-fuzz bug
  4. # https://crbug.com/oss-fuzz/17954
  5. #
  6. <info>
  7. <keywords>
  8. HTTP
  9. HTTP GET
  10. HTTP proxy
  11. followlocation
  12. </keywords>
  13. </info>
  14. #
  15. # Server-side
  16. <reply>
  17. <data>
  18. HTTP/1.1 302 OK
  19. Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no
  20. Date: Tue, 09 Nov 2010 14:49:00 GMT
  21. Content-Length: 0
  22. </data>
  23. <data2>
  24. HTTP/1.1 200 OK
  25. Location: this should be ignored
  26. Date: Tue, 09 Nov 2010 14:49:00 GMT
  27. Content-Length: 5
  28. body
  29. </data2>
  30. <datacheck>
  31. HTTP/1.1 302 OK
  32. Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no
  33. Date: Tue, 09 Nov 2010 14:49:00 GMT
  34. Content-Length: 0
  35. HTTP/1.1 200 OK
  36. Location: this should be ignored
  37. Date: Tue, 09 Nov 2010 14:49:00 GMT
  38. Content-Length: 5
  39. body
  40. </datacheck>
  41. </reply>
  42. #
  43. # Client-side
  44. <client>
  45. <server>
  46. http
  47. </server>
  48. <name>
  49. HTTP redirect with dotdots and whitespaces in absolute Location: URL
  50. </name>
  51. <command>
  52. http://example.com/please/../gimme/%TESTNUMBER?foobar#hello -L -x http://%HOSTIP:%HTTPPORT
  53. </command>
  54. <features>
  55. proxy
  56. </features>
  57. </client>
  58. #
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <protocol>
  62. GET http://example.com/gimme/%TESTNUMBER?foobar HTTP/1.1
  63. Host: example.com
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Proxy-Connection: Keep-Alive
  67. GET http://example.net/there/tes%20t%20case=/%TESTNUMBER0002?+yes+no HTTP/1.1
  68. Host: example.net
  69. User-Agent: curl/%VERSION
  70. Accept: */*
  71. Proxy-Connection: Keep-Alive
  72. </protocol>
  73. </verify>
  74. </testcase>