Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test1345
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 </keywords>
7 </info>
8
9 #
10 <reply>
11 <data nocheck="yes">
12 HTTP/1.1 200 OK\r
13 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
14 Server: test-server/fake\r
15 Content-Length: 6\r
16 Connection: close\r
17 Content-Type: text/html\r
18 Content-Disposition: filename=name1345; charset=funny; option=strange\r
19 \r
20 12345
21 </data>
22 </reply>
23
24 #
25 # Client-side
26 <client>
27 # this relies on the debug feature to allow us to set directory to store the
28 # -O output in, using the CURL_TESTDIR variable
29 <features>
30 debug
31 </features>
32 <server>
33 http
34 </server>
35 <name>
36 HTTP GET with -O -i and Content-Disposition, -D stdout
37 </name>
38 <setenv>
39 CURL_TESTDIR=%PWD/log
40 </setenv>
41 <command option="no-output,no-include">
42 http://%HOSTIP:%HTTPPORT/1345 -i -O -D -
43 </command>
44 <postcheck>
45 perl %SRCDIR/libtest/notexists.pl log/name1345
46 </postcheck>
47 </client>
48
49 #
50 # Verify data after the test has been "shot"
51 <verify>
52 <strip>
53 ^User-Agent:.*
54 </strip>
55 <protocol>
56 GET /1345 HTTP/1.1\r
57 Host: %HOSTIP:%HTTPPORT\r
58 Accept: */*\r
59 \r
60 </protocol>
61
62 <file1 name="log/1345">
63 HTTP/1.1 200 OK\r
64 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
65 Server: test-server/fake\r
66 Content-Length: 6\r
67 Connection: close\r
68 Content-Type: text/html\r
69 Content-Disposition: filename=name1345; charset=funny; option=strange\r
70 \r
71 12345
72 </file1>
73
74 <file2 name="log/stdout1345">
75 HTTP/1.1 200 OK\r
76 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
77 Server: test-server/fake\r
78 Content-Length: 6\r
79 Connection: close\r
80 Content-Type: text/html\r
81 Content-Disposition: filename=name1345; charset=funny; option=strange\r
82 \r
83 </file2>
84
85 </verify>
86 </testcase>