xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | followlocation |
| 7 | FTP |
| 8 | PASV |
| 9 | FILE |
| 10 | </keywords> |
| 11 | </info> |
| 12 | |
| 13 | # |
| 14 | # Server-side |
| 15 | <reply> |
| 16 | <data1> |
| 17 | HTTP/1.1 302 OK
|
| 18 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 19 | Server: test-server/fake swsclose
|
| 20 | Content-Type: text/html
|
| 21 | Funny-head: yesyes
|
| 22 | Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
|
| 23 | Content-Length: 0
|
| 24 | Connection: close
|
| 25 |
|
| 26 | </data1> |
| 27 | <data2> |
| 28 | data |
| 29 | to |
| 30 | see |
| 31 | that FTP |
| 32 | works |
| 33 | so does it? |
| 34 | </data2> |
| 35 | </reply> |
| 36 | |
| 37 | # |
| 38 | # Client-side |
| 39 | <client> |
| 40 | <server> |
| 41 | http |
| 42 | ftp |
| 43 | </server> |
| 44 | <name> |
| 45 | HTTP Location: redirect to FTP URL |
| 46 | </name> |
| 47 | <command> |
| 48 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -L |
| 49 | </command> |
| 50 | </client> |
| 51 | |
| 52 | # |
| 53 | # Verify data after the test has been "shot" |
| 54 | <verify> |
| 55 | <protocol> |
| 56 | GET /%TESTNUMBER0001 HTTP/1.1
|
| 57 | Host: %HOSTIP:%HTTPPORT
|
| 58 | User-Agent: curl/%VERSION
|
| 59 | Accept: */*
|
| 60 |
|
| 61 | USER anonymous
|
| 62 | PASS ftp@example.com
|
| 63 | PWD
|
| 64 | EPSV
|
| 65 | TYPE I
|
| 66 | SIZE %TESTNUMBER0002
|
| 67 | RETR %TESTNUMBER0002
|
| 68 | QUIT
|
| 69 | </protocol> |
| 70 | <stdout> |
| 71 | HTTP/1.1 302 OK
|
| 72 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 73 | Server: test-server/fake swsclose
|
| 74 | Content-Type: text/html
|
| 75 | Funny-head: yesyes
|
| 76 | Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
|
| 77 | Content-Length: 0
|
| 78 | Connection: close
|
| 79 |
|
| 80 | data |
| 81 | to |
| 82 | see |
| 83 | that FTP |
| 84 | works |
| 85 | so does it? |
| 86 | </stdout> |
| 87 | </verify> |
| 88 | </testcase> |