test28 1.4 KB

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