test40 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 302 OK swsclose
  14. Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Connection: close
  17. </data>
  18. <data2>
  19. HTTP/1.1 200 OK swsclose
  20. Location: this should be ignored
  21. Date: Tue, 09 Nov 2010 14:49:00 GMT
  22. Connection: close
  23. body
  24. </data2>
  25. <datacheck>
  26. HTTP/1.1 302 OK swsclose
  27. %if !hyper
  28. Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002
  29. %else
  30. Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002
  31. %endif
  32. Date: Tue, 09 Nov 2010 14:49:00 GMT
  33. Connection: close
  34. HTTP/1.1 200 OK swsclose
  35. Location: this should be ignored
  36. Date: Tue, 09 Nov 2010 14:49:00 GMT
  37. Connection: close
  38. body
  39. </datacheck>
  40. </reply>
  41. #
  42. # Client-side
  43. <client>
  44. <server>
  45. http
  46. </server>
  47. <name>
  48. HTTP redirect with whitespace after ? (and conversion)
  49. </name>
  50. <command>
  51. http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
  52. </command>
  53. </client>
  54. #
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <protocol>
  58. GET /we/are/all/twits/%TESTNUMBER HTTP/1.1
  59. Host: %HOSTIP:%HTTPPORT
  60. User-Agent: curl/%VERSION
  61. Accept: */*
  62. GET /we/are/all/moo.html/?name=d+a+niel&testcase=/%TESTNUMBER0002 HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. </protocol>
  67. </verify>
  68. </testcase>