test28 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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: Tue, 09 Nov 2010 14:49:00 GMT
  13. Server: test-server/fake
  14. Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.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: Tue, 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: Tue, 09 Nov 2010 14:49:00 GMT
  28. Server: test-server/fake
  29. %if hyper
  30. Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE
  31. %else
  32. Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE
  33. %endif
  34. Connection: close
  35. HTTP/1.1 200 Followed here fine swsclose
  36. Date: Tue, 09 Nov 2010 14:49:00 GMT
  37. Server: test-server/fake
  38. Content-Length: 52
  39. If this is received, the location following worked
  40. </datacheck>
  41. </reply>
  42. # Client-side
  43. <client>
  44. <server>
  45. http
  46. </server>
  47. <name>
  48. HTTP Location: following with extra spaces in header
  49. </name>
  50. <command>
  51. http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
  52. </command>
  53. </client>
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <protocol>
  57. GET /want/%TESTNUMBER HTTP/1.1
  58. Host: %HOSTIP:%HTTPPORT
  59. User-Agent: curl/%VERSION
  60. Accept: */*
  61. GET /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE HTTP/1.1
  62. Host: %HOSTIP:%HTTPPORT
  63. User-Agent: curl/%VERSION
  64. Accept: */*
  65. </protocol>
  66. </verify>
  67. </testcase>