test1314 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. followlocation
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 This is a weirdo text message swsbounce
  14. Server: test-server/fake
  15. Location: //somewhere.example.com/reply/1314
  16. Content-Length: 32
  17. Connection: close
  18. Redirect to the same URL again!
  19. </data>
  20. <data1>
  21. HTTP/1.1 200 okidoki
  22. Server: test-server/fake
  23. Content-Length: 4
  24. Connection: close
  25. moo
  26. </data1>
  27. <datacheck>
  28. HTTP/1.1 301 This is a weirdo text message swsbounce
  29. Server: test-server/fake
  30. Location: //somewhere.example.com/reply/1314
  31. Content-Length: 32
  32. Connection: close
  33. HTTP/1.1 200 okidoki
  34. Server: test-server/fake
  35. Content-Length: 4
  36. Connection: close
  37. moo
  38. </datacheck>
  39. </reply>
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP Location: following a // prefixed url
  47. </name>
  48. <command>
  49. http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT
  50. </command>
  51. </client>
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <strip>
  55. ^User-Agent: curl/.*
  56. </strip>
  57. <protocol>
  58. GET http://firstplace.example.com/want/1314 HTTP/1.1
  59. Host: firstplace.example.com
  60. Accept: */*
  61. Proxy-Connection: Keep-Alive
  62. GET http://somewhere.example.com/reply/1314 HTTP/1.1
  63. Host: somewhere.example.com
  64. Accept: */*
  65. Proxy-Connection: Keep-Alive
  66. </protocol>
  67. </verify>
  68. </testcase>