test975 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. FTP
  6. --location-trusted
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 redirect
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 0
  17. Connection: close
  18. Content-Type: text/html
  19. Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002
  20. </data>
  21. <data2>
  22. data
  23. to
  24. see
  25. that FTP
  26. works
  27. so does it?
  28. </data2>
  29. <datacheck>
  30. HTTP/1.1 301 redirect
  31. Date: Tue, 09 Nov 2010 14:49:00 GMT
  32. Server: test-server/fake
  33. Content-Length: 0
  34. Connection: close
  35. Content-Type: text/html
  36. Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002
  37. data
  38. to
  39. see
  40. that FTP
  41. works
  42. so does it?
  43. </datacheck>
  44. </reply>
  45. #
  46. # Client-side
  47. <client>
  48. <server>
  49. http
  50. ftp
  51. </server>
  52. <name>
  53. HTTP with auth redirected to FTP allowing auth to continue
  54. </name>
  55. <command>
  56. http://%HOSTIP:%HTTPPORT/%TESTNUMBER --location-trusted -u joe:secret
  57. </command>
  58. </client>
  59. #
  60. # Verify data after the test has been "shot"
  61. <verify>
  62. <protocol>
  63. GET /%TESTNUMBER HTTP/1.1
  64. Host: %HOSTIP:%HTTPPORT
  65. Authorization: Basic am9lOnNlY3JldA==
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. USER joe
  69. PASS secret
  70. PWD
  71. CWD a
  72. CWD path
  73. EPSV
  74. TYPE I
  75. SIZE %TESTNUMBER0002
  76. RETR %TESTNUMBER0002
  77. QUIT
  78. </protocol>
  79. </verify>
  80. </testcase>