test2003 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. FTP
  7. PASV
  8. FILE
  9. TFTP
  10. TFTP RRQ
  11. multiprotocol
  12. </keywords>
  13. </info>
  14. #
  15. # Server-side
  16. <reply>
  17. <data1 nocheck="yes">
  18. HTTP/1.1 200 OK
  19. Date: Thu, 09 Nov 2010 14:49:00 GMT
  20. Server: test-server/fake
  21. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  22. ETag: "21025-dc7-39462498"
  23. Accept-Ranges: bytes
  24. Content-Length: 6
  25. Connection: close
  26. Content-Type: text/html
  27. Funny-head: yesyes
  28. -foo-
  29. </data1>
  30. <data2 nocheck="yes">
  31. data
  32. to
  33. see
  34. that FTP
  35. works
  36. so does it?
  37. </data2>
  38. <data3 nocheck="yes">
  39. a chunk of
  40. data
  41. returned
  42. to TFTP client
  43. </data3>
  44. </reply>
  45. #
  46. # Client-side
  47. <client>
  48. <server>
  49. http
  50. ftp
  51. file
  52. tftp
  53. </server>
  54. <name>
  55. HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ then again in reverse order
  56. </name>
  57. <command>
  58. http://%HOSTIP:%HTTPPORT/20030001 ftp://%HOSTIP:%FTPPORT/20030002 file://localhost/%PWD/log/test2003.txt tftp://%HOSTIP:%TFTPPORT//20030003 tftp://%HOSTIP:%TFTPPORT//20030003 file://localhost/%PWD/log/test2003.txt ftp://%HOSTIP:%FTPPORT/20030002 http://%HOSTIP:%HTTPPORT/20030001
  59. </command>
  60. <file name="log/test2003.txt">
  61. foo
  62. bar
  63. bar
  64. foo
  65. moo
  66. </file>
  67. </client>
  68. #
  69. # Verify data after the test has been "shot"
  70. <verify>
  71. <strip>
  72. ^User-Agent:.*
  73. </strip>
  74. <protocol>
  75. GET /20030001 HTTP/1.1
  76. Host: %HOSTIP:%HTTPPORT
  77. Accept: */*
  78. USER anonymous
  79. PASS ftp@example.com
  80. PWD
  81. EPSV
  82. TYPE I
  83. SIZE 20030002
  84. RETR 20030002
  85. opcode: 1
  86. mode: octet
  87. tsize: 0
  88. blksize: 512
  89. timeout: 6
  90. filename: /20030003
  91. opcode: 1
  92. mode: octet
  93. tsize: 0
  94. blksize: 512
  95. timeout: 6
  96. filename: /20030003
  97. EPSV
  98. SIZE 20030002
  99. RETR 20030002
  100. GET /20030001 HTTP/1.1
  101. Host: %HOSTIP:%HTTPPORT
  102. Accept: */*
  103. QUIT
  104. </protocol>
  105. <stdout>
  106. HTTP/1.1 200 OK
  107. Date: Thu, 09 Nov 2010 14:49:00 GMT
  108. Server: test-server/fake
  109. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  110. ETag: "21025-dc7-39462498"
  111. Accept-Ranges: bytes
  112. Content-Length: 6
  113. Connection: close
  114. Content-Type: text/html
  115. Funny-head: yesyes
  116. -foo-
  117. data
  118. to
  119. see
  120. that FTP
  121. works
  122. so does it?
  123. foo
  124. bar
  125. bar
  126. foo
  127. moo
  128. a chunk of
  129. data
  130. returned
  131. to TFTP client
  132. a chunk of
  133. data
  134. returned
  135. to TFTP client
  136. foo
  137. bar
  138. bar
  139. foo
  140. moo
  141. data
  142. to
  143. see
  144. that FTP
  145. works
  146. so does it?
  147. HTTP/1.1 200 OK
  148. Date: Thu, 09 Nov 2010 14:49:00 GMT
  149. Server: test-server/fake
  150. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  151. ETag: "21025-dc7-39462498"
  152. Accept-Ranges: bytes
  153. Content-Length: 6
  154. Connection: close
  155. Content-Type: text/html
  156. Funny-head: yesyes
  157. -foo-
  158. </stdout>
  159. </verify>
  160. </testcase>