test43 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. HTTP proxy
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 This is a weirdo text message
  14. Date: Thu, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Location: data/430002.txt?coolsite=yes
  17. Connection: close
  18. This server reply is for testing a simple Location: following
  19. </data>
  20. <data2>
  21. HTTP/1.1 200 Followed here fine swsclose
  22. Date: Thu, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 52
  25. If this is received, the location following worked
  26. </data2>
  27. <datacheck>
  28. HTTP/1.1 301 This is a weirdo text message
  29. Date: Thu, 09 Nov 2010 14:49:00 GMT
  30. Server: test-server/fake
  31. Location: data/430002.txt?coolsite=yes
  32. Connection: close
  33. HTTP/1.1 200 Followed here fine swsclose
  34. Date: Thu, 09 Nov 2010 14:49:00 GMT
  35. Server: test-server/fake
  36. Content-Length: 52
  37. If this is received, the location following worked
  38. </datacheck>
  39. </reply>
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP Location: following over HTTP proxy
  47. </name>
  48. <command>
  49. http://%HOSTIP:%HTTPPORT/want/43 -L -x %HOSTIP:%HTTPPORT
  50. </command>
  51. </client>
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <strip>
  55. ^User-Agent:.*
  56. </strip>
  57. <protocol>
  58. GET http://%HOSTIP:%HTTPPORT/want/43 HTTP/1.1
  59. Host: %HOSTIP:%HTTPPORT
  60. Accept: */*
  61. Proxy-Connection: Keep-Alive
  62. GET http://%HOSTIP:%HTTPPORT/want/data/430002.txt?coolsite=yes HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. Accept: */*
  65. Proxy-Connection: Keep-Alive
  66. </protocol>
  67. </verify>
  68. </testcase>