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