test424 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <testcase>
  2. <info>
  3. <keywords>
  4. -w
  5. --write-out
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data crlf="yes" nocheck="yes">
  12. HTTP/1.1 301 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  16. ETag: "21025-dc7-39462498"
  17. Accept-Ranges: bytes
  18. Content-Length: 0
  19. Connection: close
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. Location: http://anotherhost.example:2023/%TESTNUMBER0002?moo.html
  23. </data>
  24. <data2 crlf="yes" nocheck="yes">
  25. HTTP/1.1 200 OK
  26. Date: Tue, 09 Nov 2010 14:49:00 GMT
  27. Server: test-server/fake
  28. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  29. ETag: "21025-dc7-39462498"
  30. Accept-Ranges: bytes
  31. Content-Length: 0
  32. Connection: close
  33. Content-Type: text/html
  34. Funny-head: yesyes
  35. </data2>
  36. </reply>
  37. #
  38. # Client-side
  39. <client>
  40. <features>
  41. proxy
  42. </features>
  43. <server>
  44. http
  45. </server>
  46. <name>
  47. -w with urle.* variables
  48. </name>
  49. <command option="no-include">
  50. "http://uuuu:pppp@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" "h55p://hello2000:1/%TESTNUMBER?qqqq#ffff" "local host" "http://u22u:p22p@%HOSTIP:%HTTPPORT/%TESTNUMBER?qqqq#ffff" -w '%{urle.host}+%{urle.path}+%{urle.scheme}+%{urle.user}+%{urle.password}+%{urle.port}+%{urle.query}+%{urle.fragment}\n' -x http://%HOSTIP:%HTTPPORT/ -L
  51. </command>
  52. </client>
  53. #
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <stdout>
  57. anotherhost.example+/%TESTNUMBER0002+http+uuuu+pppp+2023+moo.html+
  58. hello2000+/%TESTNUMBER+h55p+++1+qqqq+ffff
  59. +++++++
  60. anotherhost.example+/%TESTNUMBER0002+http+u22u+p22p+2023+moo.html+
  61. </stdout>
  62. </verify>
  63. </testcase>