test662 1.3 KB

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