xref: /curl/tests/data/test1340 (revision 18f1cd7a)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6-J
7</keywords>
8</info>
9
10#
11<reply>
12<data nocheck="yes">
13HTTP/1.1 200 OK
14Date: Tue, 09 Nov 2010 14:49:00 GMT
15Server: test-server/fake
16Content-Length: 6
17Connection: close
18Content-Type: text/html
19Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
20
2112345
22</data>
23</reply>
24
25#
26# Client-side
27<client>
28# this relies on the debug feature to allow us to set directory to store the
29# -O and -J output in, using the CURL_TESTDIR variable
30<features>
31Debug
32</features>
33<server>
34http
35</server>
36<name>
37HTTP GET with -O -J and Content-Disposition, -D file
38</name>
39<setenv>
40CURL_TESTDIR=%PWD/%LOGDIR
41</setenv>
42<command option="no-output,no-include">
43http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D %LOGDIR/heads%TESTNUMBER -w "curl saved to filename %{filename_effective}\n"
44</command>
45</client>
46
47#
48# Verify data after the test has been "shot"
49<verify>
50<protocol>
51GET /%TESTNUMBER HTTP/1.1
52Host: %HOSTIP:%HTTPPORT
53User-Agent: curl/%VERSION
54Accept: */*
55
56</protocol>
57
58<file1 name="%LOGDIR/name%TESTNUMBER">
5912345
60</file1>
61
62<file2 name="%LOGDIR/heads%TESTNUMBER">
63HTTP/1.1 200 OK
64Date: Tue, 09 Nov 2010 14:49:00 GMT
65Server: test-server/fake
66Content-Length: 6
67Connection: close
68Content-Type: text/html
69Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
70
71</file2>
72
73<file3 name="%LOGDIR/stdout%TESTNUMBER" mode="text">
74curl saved to filename %PWD/%LOGDIR/name%TESTNUMBER
75</file3>
76
77</verify>
78</testcase>
79