test1232 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <testcase>
  2. <info>
  3. # This test is a copy of test 1231, modified to use a HTTP proxy.
  4. <keywords>
  5. HTTP
  6. HTTP GET
  7. HTTP proxy
  8. dotdot removal
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply name="1">
  14. <data>
  15. HTTP/1.1 200 OK
  16. Content-Length: 6
  17. Connection: close
  18. -foo-
  19. </data>
  20. <data1>
  21. HTTP/1.1 200 OK
  22. Content-Length: 7
  23. Connection: close
  24. -cool-
  25. </data1>
  26. </reply>
  27. #
  28. # Client-side
  29. <client>
  30. <server>
  31. http
  32. </server>
  33. <name>
  34. HTTP URL with dotdot removal from path using an HTTP proxy
  35. </name>
  36. <command>
  37. --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1232:8990/../../hej/but/who/../1232?stupid=me/../1232#soo/../1232 http://test.remote.haxx.se.1232:8990/../../hej/but/who/../12320001#/../12320001
  38. </command>
  39. </client>
  40. #
  41. # Verify data after the test has been "shot"
  42. <verify>
  43. <strip>
  44. ^User-Agent:.*
  45. </strip>
  46. <protocol>
  47. GET http://test.remote.haxx.se.1232:8990/hej/but/1232?stupid=me/../1232 HTTP/1.1
  48. Host: test.remote.haxx.se.1232:8990
  49. Accept: */*
  50. Proxy-Connection: Keep-Alive
  51. GET http://test.remote.haxx.se.1232:8990/hej/but/12320001 HTTP/1.1
  52. Host: test.remote.haxx.se.1232:8990
  53. Accept: */*
  54. Proxy-Connection: Keep-Alive
  55. </protocol>
  56. </verify>
  57. </testcase>