test1241 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <testcase>
  2. <info>
  3. # verify that dotdot removal can be disabled!
  4. <keywords>
  5. HTTP
  6. HTTP GET
  7. HTTP proxy
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 200 OK
  15. Content-Length: 6
  16. Connection: close
  17. -foo-
  18. </data>
  19. <data1>
  20. HTTP/1.1 200 OK
  21. Content-Length: 7
  22. Connection: close
  23. -cool-
  24. </data1>
  25. </reply>
  26. #
  27. # Client-side
  28. <client>
  29. <server>
  30. http
  31. </server>
  32. <name>
  33. HTTP _without_ dotdot removal
  34. </name>
  35. <command>
  36. --path-as-is --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001
  37. </command>
  38. <features>
  39. proxy
  40. </features>
  41. </client>
  42. #
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <protocol>
  46. GET http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1
  47. Host: test.remote.haxx.se.%TESTNUMBER:8990
  48. User-Agent: curl/%VERSION
  49. Accept: */*
  50. Proxy-Connection: Keep-Alive
  51. GET http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001 HTTP/1.1
  52. Host: test.remote.haxx.se.%TESTNUMBER:8990
  53. User-Agent: curl/%VERSION
  54. Accept: */*
  55. Proxy-Connection: Keep-Alive
  56. </protocol>
  57. </verify>
  58. </testcase>