| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 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 | 
|  | 13 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
|  | 14 | Server: test-server/fake | 
|  | 15 | Content-Length: 6 | 
|  | 16 | Connection: close | 
|  | 17 | Content-Type: text/html | 
|  | 18 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange | 
|  | 19 |  | 
|  | 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/%TESTNUMBER -i -O -D - | 
|  | 43 | </command> | 
|  | 44 | <postcheck> | 
|  | 45 | perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER | 
|  | 46 | </postcheck> | 
|  | 47 | </client> | 
|  | 48 |  | 
|  | 49 | # | 
|  | 50 | # Verify data after the test has been "shot" | 
|  | 51 | <verify> | 
|  | 52 | <protocol> | 
|  | 53 | GET /%TESTNUMBER HTTP/1.1 | 
|  | 54 | Host: %HOSTIP:%HTTPPORT | 
|  | 55 | User-Agent: curl/%VERSION | 
|  | 56 | Accept: */* | 
|  | 57 |  | 
|  | 58 | </protocol> | 
|  | 59 |  | 
|  | 60 | <file1 name="log/%TESTNUMBER"> | 
|  | 61 | HTTP/1.1 200 OK | 
|  | 62 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
|  | 63 | Server: test-server/fake | 
|  | 64 | Content-Length: 6 | 
|  | 65 | Connection: close | 
|  | 66 | Content-Type: text/html | 
|  | 67 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange | 
|  | 68 |  | 
|  | 69 | 12345 | 
|  | 70 | </file1> | 
|  | 71 |  | 
|  | 72 | <file2 name="log/stdout%TESTNUMBER"> | 
|  | 73 | HTTP/1.1 200 OK | 
|  | 74 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
|  | 75 | Server: test-server/fake | 
|  | 76 | Content-Length: 6 | 
|  | 77 | Connection: close | 
|  | 78 | Content-Type: text/html | 
|  | 79 | Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange | 
|  | 80 |  | 
|  | 81 | </file2> | 
|  | 82 |  | 
|  | 83 | </verify> | 
|  | 84 | </testcase> |