test184 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 OK swsbounce
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Content-Length: 4
  16. Location: http://yet.another.host/%TESTNUMBER
  17. moo
  18. </data>
  19. <data1>
  20. HTTP/1.1 200 OK
  21. Date: Tue, 09 Nov 2010 14:49:00 GMT
  22. Content-Length: 4
  23. moo
  24. </data1>
  25. <datacheck>
  26. HTTP/1.1 301 OK swsbounce
  27. Date: Tue, 09 Nov 2010 14:49:00 GMT
  28. Content-Length: 4
  29. Location: http://yet.another.host/%TESTNUMBER
  30. HTTP/1.1 200 OK
  31. Date: Tue, 09 Nov 2010 14:49:00 GMT
  32. Content-Length: 4
  33. moo
  34. </datacheck>
  35. </reply>
  36. # Client-side
  37. <client>
  38. <server>
  39. http
  40. </server>
  41. <name>
  42. HTTP replace Host: when following Location: to new host
  43. </name>
  44. <command>
  45. http://deathstar.another.galaxy/%TESTNUMBER -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
  46. </command>
  47. <features>
  48. proxy
  49. </features>
  50. </client>
  51. # Verify data after the test has been "shot"
  52. <verify>
  53. <protocol>
  54. GET http://deathstar.another.galaxy/%TESTNUMBER HTTP/1.1
  55. Host: another.visitor.stay.a.while.stay.foreeeeeever
  56. User-Agent: curl/%VERSION
  57. Accept: */*
  58. Proxy-Connection: Keep-Alive
  59. GET http://yet.another.host/%TESTNUMBER HTTP/1.1
  60. Host: yet.another.host
  61. User-Agent: curl/%VERSION
  62. Accept: */*
  63. Proxy-Connection: Keep-Alive
  64. </protocol>
  65. </verify>
  66. </testcase>