xref: /curl/tests/data/test1340 (revision 39697dea)
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<server>
29http
30</server>
31<name>
32HTTP GET with -O -J and Content-Disposition, -D file
33</name>
34<command option="no-output,no-include">
35http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D %LOGDIR/heads%TESTNUMBER -w "curl saved to filename %{filename_effective}\n" --output-dir %LOGDIR
36</command>
37</client>
38
39#
40# Verify data after the test has been "shot"
41<verify>
42<protocol>
43GET /%TESTNUMBER HTTP/1.1
44Host: %HOSTIP:%HTTPPORT
45User-Agent: curl/%VERSION
46Accept: */*
47
48</protocol>
49
50<file1 name="%LOGDIR/name%TESTNUMBER">
5112345
52</file1>
53
54<file2 name="%LOGDIR/heads%TESTNUMBER">
55HTTP/1.1 200 OK
56Date: Tue, 09 Nov 2010 14:49:00 GMT
57Server: test-server/fake
58Content-Length: 6
59Connection: close
60Content-Type: text/html
61Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
62
63</file2>
64
65<file3 name="%LOGDIR/stdout%TESTNUMBER" mode="text">
66curl saved to filename %LOGDIR/name%TESTNUMBER
67</file3>
68
69</verify>
70</testcase>
71