test1361 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. RETR
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. # file1361 contents...
  11. <data nocheck="yes">
  12. HTTP/1.1 200 OK
  13. Date: Thu, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Length: 6
  16. Connection: close
  17. Content-Type: text/html
  18. Content-Disposition: filename=name1361; charset=funny; option=strange
  19. MOOOO
  20. </data>
  21. </reply>
  22. # Client-side
  23. <client>
  24. # this relies on the debug feature to allow us to set directory to store the
  25. # -O output in, using the CURL_TESTDIR variable
  26. <features>
  27. debug
  28. </features>
  29. <server>
  30. ftp
  31. </server>
  32. <name>
  33. FTP download, file with C-D inside, using -O -i -D file
  34. </name>
  35. <setenv>
  36. CURL_TESTDIR=%PWD/log
  37. </setenv>
  38. <command option="no-output,no-include">
  39. ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361
  40. </command>
  41. <postcheck>
  42. perl %SRCDIR/libtest/notexists.pl log/name1361
  43. </postcheck>
  44. </client>
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <protocol>
  48. USER anonymous
  49. PASS ftp@example.com
  50. PWD
  51. CWD path
  52. EPSV
  53. TYPE I
  54. SIZE file1361
  55. RETR file1361
  56. QUIT
  57. </protocol>
  58. <file1 name="log/file1361">
  59. HTTP/1.1 200 OK
  60. Date: Thu, 09 Nov 2010 14:49:00 GMT
  61. Server: test-server/fake
  62. Content-Length: 6
  63. Connection: close
  64. Content-Type: text/html
  65. Content-Disposition: filename=name1361; charset=funny; option=strange
  66. MOOOO
  67. </file1>
  68. <file2 name="log/heads1361">
  69. 220- _ _ ____ _
  70. 220- ___| | | | _ \| |
  71. 220- / __| | | | |_) | |
  72. 220- | (__| |_| | _ {| |___
  73. 220 \___|\___/|_| \_\_____|
  74. 331 We are happy you popped in!
  75. 230 Welcome you silly person
  76. 257 "/" is current directory
  77. 250 CWD command successful.
  78. 229 Entering Passive Mode (stripped)
  79. 200 I modify TYPE as you wanted
  80. 213 214
  81. 150 Binary data connection for 1361 () (214 bytes).
  82. 226 File transfer complete
  83. </file2>
  84. <stripfile2>
  85. s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
  86. </stripfile2>
  87. <file3 name="log/stdout1361">
  88. </file3>
  89. </verify>
  90. </testcase>