test1632 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <testcase>
  2. <info>
  3. <keywords>
  4. FTP
  5. HTTPS-proxy
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. # This is the HTTPS proxy response
  11. <connect>
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Type: text/html
  16. Funny-head: yesyes
  17. Content-Length: 0
  18. </connect>
  19. # This is the FTP server response. The Life and Adventures of Robinson Crusoe
  20. <data>
  21. I was born in the year %TESTNUMBER, in the city of York, of a good family, though not
  22. of that country, myfather being a foreigner of Bremen, who settled first at
  23. Hull. He got a good estate by merchandise,and leaving off his trade, lived
  24. afterwards at York, from whence he had married my mother, whoserelations were
  25. named Robinson, a very good family in that country, and from whom I was
  26. calledRobinson Kreutznaer; but, by the usual corruption of words in England,
  27. we are now called—nay wecall ourselves and write our name—Crusoe; and so my
  28. companions always called me.
  29. </data>
  30. <data2>
  31. I had two elder brothers, one of whom was lieutenant-colonel to an
  32. English regiment of foot inFlanders, formerly commanded by the famous Colonel
  33. Lockhart, and was killed at the battle nearDunkirk against the Spaniards.
  34. What became of my second brother I never knew, any more thanmy father or
  35. mother knew what became of me.
  36. </data2>
  37. </reply>
  38. # Client-side
  39. <client>
  40. <server>
  41. ftp
  42. https-proxy
  43. </server>
  44. <name>
  45. FTP through HTTPS-proxy, with connection re-use
  46. </name>
  47. <command>
  48. -p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER0002
  49. </command>
  50. <features>
  51. http
  52. proxy
  53. </features>
  54. </client>
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. # The second and third CONNECT will be made to the dynamic port number the FTP
  58. # server opens for us, so we can't compare with known pre-existing numbers!
  59. <strippart>
  60. s/((https.proxy):(\d+))/$2:12345/
  61. s/^(User-Agent: curl).*/$1/
  62. </strippart>
  63. <proxy>
  64. CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
  65. Host: ftp.site.thru.https.proxy:12345
  66. User-Agent: curl
  67. Proxy-Connection: Keep-Alive
  68. CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
  69. Host: ftp.site.thru.https.proxy:12345
  70. User-Agent: curl
  71. Proxy-Connection: Keep-Alive
  72. CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
  73. Host: ftp.site.thru.https.proxy:12345
  74. User-Agent: curl
  75. Proxy-Connection: Keep-Alive
  76. </proxy>
  77. <protocol>
  78. USER anonymous
  79. PASS ftp@example.com
  80. PWD
  81. EPSV
  82. TYPE I
  83. SIZE %TESTNUMBER
  84. RETR %TESTNUMBER
  85. EPSV
  86. SIZE %TESTNUMBER0002
  87. RETR %TESTNUMBER0002
  88. QUIT
  89. </protocol>
  90. </verify>
  91. </testcase>