2
0

test43 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Location: data/%TESTNUMBER0002.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: Tue, 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: Tue, 09 Nov 2010 14:49:00 GMT
  30. Server: test-server/fake
  31. Location: data/%TESTNUMBER0002.txt?coolsite=yes
  32. Connection: close
  33. HTTP/1.1 200 Followed here fine swsclose
  34. Date: Tue, 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/%TESTNUMBER -L -x %HOSTIP:%HTTPPORT
  50. </command>
  51. <features>
  52. proxy
  53. </features>
  54. </client>
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <protocol>
  58. GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
  59. Host: %HOSTIP:%HTTPPORT
  60. User-Agent: curl/%VERSION
  61. Accept: */*
  62. Proxy-Connection: Keep-Alive
  63. GET http://%HOSTIP:%HTTPPORT/want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
  64. Host: %HOSTIP:%HTTPPORT
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. Proxy-Connection: Keep-Alive
  68. </protocol>
  69. </verify>
  70. </testcase>