test1028 1.2 KB

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