test2001 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. FTP
  7. PASV
  8. FILE
  9. multiprotocol
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <data1 nocheck="yes">
  16. HTTP/1.1 200 OK
  17. Date: Thu, 09 Nov 2010 14:49:00 GMT
  18. Server: test-server/fake
  19. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  20. ETag: "21025-dc7-39462498"
  21. Accept-Ranges: bytes
  22. Content-Length: 6
  23. Connection: close
  24. Content-Type: text/html
  25. Funny-head: yesyes
  26. -foo-
  27. </data1>
  28. <data2 nocheck="yes">
  29. data
  30. to
  31. see
  32. that FTP
  33. works
  34. so does it?
  35. </data2>
  36. </reply>
  37. #
  38. # Client-side
  39. <client>
  40. <server>
  41. http
  42. ftp
  43. file
  44. </server>
  45. <name>
  46. HTTP GET followed by FTP RETR followed by FILE
  47. </name>
  48. <command>
  49. http://%HOSTIP:%HTTPPORT/20010001 ftp://%HOSTIP:%FTPPORT/20010002 file://localhost/%PWD/log/test2001.txt
  50. </command>
  51. <file name="log/test2001.txt">
  52. foo
  53. bar
  54. bar
  55. foo
  56. moo
  57. </file>
  58. </client>
  59. #
  60. # Verify data after the test has been "shot"
  61. <verify>
  62. <strip>
  63. ^User-Agent:.*
  64. </strip>
  65. <protocol>
  66. GET /20010001 HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. Accept: */*
  69. USER anonymous
  70. PASS ftp@example.com
  71. PWD
  72. EPSV
  73. TYPE I
  74. SIZE 20010002
  75. RETR 20010002
  76. QUIT
  77. </protocol>
  78. <stdout>
  79. HTTP/1.1 200 OK
  80. Date: Thu, 09 Nov 2010 14:49:00 GMT
  81. Server: test-server/fake
  82. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  83. ETag: "21025-dc7-39462498"
  84. Accept-Ranges: bytes
  85. Content-Length: 6
  86. Connection: close
  87. Content-Type: text/html
  88. Funny-head: yesyes
  89. -foo-
  90. data
  91. to
  92. see
  93. that FTP
  94. works
  95. so does it?
  96. foo
  97. bar
  98. bar
  99. foo
  100. moo
  101. </stdout>
  102. </verify>
  103. </testcase>