test185 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 301 OK swsbounce
  13. Date: Thu, 09 Nov 2010 14:49:00 GMT
  14. Content-Length: 4
  15. Location: go/west/185
  16. moo
  17. </data>
  18. <data1>
  19. HTTP/1.1 200 OK
  20. Date: Thu, 09 Nov 2010 14:49:00 GMT
  21. Content-Length: 4
  22. moo
  23. </data1>
  24. <datacheck>
  25. HTTP/1.1 301 OK swsbounce
  26. Date: Thu, 09 Nov 2010 14:49:00 GMT
  27. Content-Length: 4
  28. Location: go/west/185
  29. HTTP/1.1 200 OK
  30. Date: Thu, 09 Nov 2010 14:49:00 GMT
  31. Content-Length: 4
  32. moo
  33. </datacheck>
  34. </reply>
  35. # Client-side
  36. <client>
  37. <server>
  38. http
  39. </server>
  40. <name>
  41. HTTP replace Host: when following Location: on the same host
  42. </name>
  43. <command>
  44. http://deathstar.another.galaxy/185 -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
  45. </command>
  46. </client>
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <strip>
  50. ^User-Agent: curl/.*
  51. </strip>
  52. <protocol>
  53. GET http://deathstar.another.galaxy/185 HTTP/1.1
  54. User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.6b zlib/1.1.4 libidn/0.4.6
  55. Pragma: no-cache
  56. Accept: */*
  57. Proxy-Connection: Keep-Alive
  58. Host: another.visitor.stay.a.while.stay.foreeeeeever
  59. GET http://deathstar.another.galaxy/go/west/185 HTTP/1.1
  60. Pragma: no-cache
  61. Accept: */*
  62. Proxy-Connection: Keep-Alive
  63. Host: another.visitor.stay.a.while.stay.foreeeeeever
  64. </protocol>
  65. </verify>
  66. </testcase>