~ubuntu-branches/ubuntu/maverick/curl/maverick

« back to all changes in this revision

Viewing changes to tests/data/test1028

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-18 15:21:57 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20080618152157-j8b12047aqcl6kii
Tags: upstream-7.18.2
ImportĀ upstreamĀ versionĀ 7.18.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#
 
14
# Server-side
 
15
<reply>
 
16
<data1>
 
17
HTTP/1.1 302 OK
 
18
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
19
Server: test-server/fake swsclose
 
20
Content-Type: text/html
 
21
Funny-head: yesyes
 
22
Location: ftp://127.0.0.1:8992/10280002
 
23
Content-Length: 0
 
24
Connection: close
 
25
 
 
26
</data1>
 
27
<data2>
 
28
data
 
29
    to
 
30
      see
 
31
that FTP
 
32
works
 
33
  so does it?
 
34
</data2>
 
35
</reply>
 
36
 
 
37
#
 
38
# Client-side
 
39
<client>
 
40
<server>
 
41
http
 
42
ftp
 
43
</server>
 
44
 <name>
 
45
HTTP Location: redirect to FTP URL
 
46
 </name>
 
47
 <command>
 
48
-k http://%HOSTIP:%HTTPPORT/10280001 -L
 
49
</command>
 
50
# The data section doesn't do variable substitution, so we must assert this
 
51
<precheck>
 
52
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%FTPPORT' ne '8992' );"
 
53
</precheck>
 
54
</client>
 
55
 
 
56
#
 
57
# Verify data after the test has been "shot"
 
58
<verify>
 
59
<strip>
 
60
^User-Agent:.*
 
61
</strip>
 
62
<protocol>
 
63
GET /10280001 HTTP/1.1
 
64
Host: %HOSTIP:%HTTPPORT
 
65
Accept: */*
 
66
 
 
67
USER anonymous
 
68
PASS ftp@example.com
 
69
PWD
 
70
EPSV
 
71
TYPE I
 
72
SIZE 10280002
 
73
RETR 10280002
 
74
QUIT
 
75
</protocol>
 
76
<stdout>
 
77
HTTP/1.1 302 OK
 
78
Date: Thu, 09 Nov 2010 14:49:00 GMT
 
79
Server: test-server/fake swsclose
 
80
Content-Type: text/html
 
81
Funny-head: yesyes
 
82
Location: ftp://%HOSTIP:%FTPPORT/10280002
 
83
Content-Length: 0
 
84
Connection: close
 
85
 
 
86
data
 
87
    to
 
88
      see
 
89
that FTP
 
90
works
 
91
  so does it?
 
92
</stdout>
 
93
</verify>
 
94
</testcase>