xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 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 | # |
| 16 | # Server-side |
| 17 | <reply> |
| 18 | <data1 nocheck="yes"> |
| 19 | HTTP/1.1 200 OK
|
| 20 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 21 | Server: test-server/fake
|
| 22 | Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
| 23 | ETag: "21025-dc7-39462498"
|
| 24 | Accept-Ranges: bytes
|
| 25 | Content-Length: 6
|
| 26 | Connection: close
|
| 27 | Content-Type: text/html
|
| 28 | Funny-head: yesyes
|
| 29 |
|
| 30 | -foo- |
| 31 | </data1> |
| 32 | <data2 nocheck="yes"> |
| 33 | data |
| 34 | to |
| 35 | see |
| 36 | that FTP |
| 37 | works |
| 38 | so does it? |
| 39 | </data2> |
| 40 | <data3 nocheck="yes"> |
| 41 | a chunk of |
| 42 | data |
| 43 | returned |
| 44 | to TFTP client |
| 45 | </data3> |
| 46 | </reply> |
| 47 | |
| 48 | # |
| 49 | # Client-side |
| 50 | <client> |
| 51 | <server> |
| 52 | http |
| 53 | ftp |
| 54 | file |
| 55 | tftp |
| 56 | </server> |
| 57 | <name> |
| 58 | HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ |
| 59 | </name> |
| 60 | <command option="no-include"> |
| 61 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003 |
| 62 | </command> |
| 63 | <file name="log/test%TESTNUMBER.txt"> |
| 64 | foo |
| 65 | bar |
| 66 | bar |
| 67 | foo |
| 68 | moo |
| 69 | </file> |
| 70 | </client> |
| 71 | |
| 72 | # |
| 73 | # Verify data after the test has been "shot" |
| 74 | <verify> |
| 75 | <protocol> |
| 76 | GET /%TESTNUMBER0001 HTTP/1.1
|
| 77 | Host: %HOSTIP:%HTTPPORT
|
| 78 | User-Agent: curl/%VERSION
|
| 79 | Accept: */*
|
| 80 |
|
| 81 | USER anonymous
|
| 82 | PASS ftp@example.com
|
| 83 | PWD
|
| 84 | EPSV
|
| 85 | TYPE I
|
| 86 | SIZE %TESTNUMBER0002
|
| 87 | RETR %TESTNUMBER0002
|
| 88 | opcode = 1 |
| 89 | mode = octet |
| 90 | tsize = 0 |
| 91 | blksize = 512 |
| 92 | timeout = 6 |
| 93 | filename = /%TESTNUMBER0003 |
| 94 | QUIT
|
| 95 | </protocol> |
| 96 | <stdout> |
| 97 | -foo- |
| 98 | data |
| 99 | to |
| 100 | see |
| 101 | that FTP |
| 102 | works |
| 103 | so does it? |
| 104 | foo |
| 105 | bar |
| 106 | bar |
| 107 | foo |
| 108 | moo |
| 109 | a chunk of |
| 110 | data |
| 111 | returned |
| 112 | to TFTP client |
| 113 | </stdout> |
| 114 | </verify> |
| 115 | </testcase> |