test1055 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. followlocation
  7. FTP
  8. EPSV
  9. STOR
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <data>
  16. HTTP/1.1 307 OK
  17. Date: Thu, 09 Nov 2010 14:49:00 GMT
  18. Server: test-server/fake swsclose
  19. Content-Type: text/html
  20. Location: ftp://127.0.0.1:8992/1055
  21. Content-Length: 0
  22. Connection: close
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. ftp
  31. </server>
  32. <name>
  33. HTTP PUT Location: redirect to FTP URL
  34. </name>
  35. <command>
  36. http://%HOSTIP:%HTTPPORT/1055 -L -T log/test1055.txt
  37. </command>
  38. # The data section doesn't do variable substitution, so we must assert this
  39. <precheck>
  40. perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%FTPPORT' ne '8992' );"
  41. </precheck>
  42. <file name="log/test1055.txt">
  43. Weird
  44. file
  45. to
  46. upload
  47. for
  48. testing
  49. the
  50. PUT
  51. feature
  52. </file>
  53. </client>
  54. #
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <strip>
  58. ^User-Agent:.*
  59. </strip>
  60. <protocol>
  61. PUT /1055 HTTP/1.1
  62. Host: %HOSTIP:%HTTPPORT
  63. Accept: */*
  64. Content-Length: 78
  65. Expect: 100-continue
  66. Weird
  67. file
  68. to
  69. upload
  70. for
  71. testing
  72. the
  73. PUT
  74. feature
  75. USER anonymous
  76. PASS ftp@example.com
  77. PWD
  78. EPSV
  79. TYPE I
  80. STOR 1055
  81. QUIT
  82. </protocol>
  83. <upload>
  84. Weird
  85. file
  86. to
  87. upload
  88. for
  89. testing
  90. the
  91. PUT
  92. feature
  93. </upload>
  94. </verify>
  95. </testcase>