xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | -J |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # |
| 11 | <reply> |
| 12 | <data nocheck="yes"> |
| 13 | HTTP/1.1 200 OK
|
| 14 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 15 | Server: test-server/fake
|
| 16 | Content-Length: 6
|
| 17 | Connection: close
|
| 18 | Content-Type: text/html
|
| 19 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
|
| 20 |
|
| 21 | 12345 |
| 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> |
| 31 | debug |
| 32 | </features> |
| 33 | <server> |
| 34 | http |
| 35 | </server> |
| 36 | <name> |
| 37 | HTTP GET with -O -J and Content-Disposition, -D stdout |
| 38 | </name> |
| 39 | <setenv> |
| 40 | CURL_TESTDIR=%PWD/log |
| 41 | </setenv> |
| 42 | <command option="no-output,no-include"> |
| 43 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D - -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> |
| 51 | GET /%TESTNUMBER HTTP/1.1
|
| 52 | Host: %HOSTIP:%HTTPPORT
|
| 53 | User-Agent: curl/%VERSION
|
| 54 | Accept: */*
|
| 55 |
|
| 56 | </protocol> |
| 57 | |
| 58 | <file1 name="log/name%TESTNUMBER"> |
| 59 | 12345 |
| 60 | </file1> |
| 61 | |
| 62 | <file2 name="log/stdout%TESTNUMBER"> |
| 63 | HTTP/1.1 200 OK
|
| 64 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 65 | Server: test-server/fake
|
| 66 | Content-Length: 6
|
| 67 | Connection: close
|
| 68 | Content-Type: text/html
|
| 69 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
|
| 70 |
|
| 71 | curl saved to filename %PWD/log/name%TESTNUMBER |
| 72 | </file2> |
| 73 | |
| 74 | </verify> |
| 75 | </testcase> |