test1232 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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>
  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.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001
  38. </command>
  39. <features>
  40. proxy
  41. </features>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <protocol>
  47. GET http://test.remote.haxx.se.%TESTNUMBER:8990/hej/but/%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1
  48. Host: test.remote.haxx.se.%TESTNUMBER:8990
  49. User-Agent: curl/%VERSION
  50. Accept: */*
  51. Proxy-Connection: Keep-Alive
  52. GET http://test.remote.haxx.se.%TESTNUMBER:8990/hej/but/%TESTNUMBER0001 HTTP/1.1
  53. Host: test.remote.haxx.se.%TESTNUMBER:8990
  54. User-Agent: curl/%VERSION
  55. Accept: */*
  56. Proxy-Connection: Keep-Alive
  57. </protocol>
  58. </verify>
  59. </testcase>