test2085 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. followlocation
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data nocheck="yes">
  11. HTTP/1.1 302 OK swsclose
  12. Location: data2.html/%TESTNUMBER0002
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Connection: close
  15. </data>
  16. <data2 nocheck="yes">
  17. HTTP/1.1 200 OK swsclose
  18. Location: this should be ignored
  19. Date: Tue, 09 Nov 2010 14:49:00 GMT
  20. Connection: close
  21. body
  22. </data2>
  23. </reply>
  24. # Client-side
  25. <client>
  26. <server>
  27. http
  28. </server>
  29. <name>
  30. Pre-request callback for HTTP with location following
  31. </name>
  32. <tool>
  33. libprereq
  34. </tool>
  35. <command>
  36. %HOSTIP:%HTTPPORT/%TESTNUMBER#redir
  37. </command>
  38. </client>
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. <stripfile>
  42. s/^Local port = \d+/Local port = stripped/
  43. </stripfile>
  44. <stdout>
  45. Connected to %HOSTIP
  46. Connected from %CLIENTIP
  47. Remote port = %HTTPPORT
  48. Local port = stripped
  49. Returning = 0
  50. Connected to %HOSTIP
  51. Connected from %CLIENTIP
  52. Remote port = %HTTPPORT
  53. Local port = stripped
  54. Returning = 0
  55. </stdout>
  56. </verify>
  57. </testcase>