test1158 (2089B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP FORMPOST 6 </keywords> 7 </info> 8 # Server-side 9 <reply> 10 <data> 11 HTTP/1.1 200 OK 12 Date: Tue, 09 Nov 2010 14:49:00 GMT 13 Server: test-server/fake 14 Content-Length: 10 15 16 blablabla 17 </data> 18 </reply> 19 20 # Client-side 21 <client> 22 <features> 23 Mime 24 !win32 25 </features> 26 <server> 27 http 28 </server> 29 <name> 30 HTTP RFC1867-type formposting with filename containing '"' 31 </name> 32 <command> 33 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"' 34 </command> 35 # We create this file before the command is invoked! 36 <file name=%LOGDIR/test%TESTNUMBER".txt> 37 foo bar 38 This is a bar foo 39 bar 40 foo 41 </file> 42 </client> 43 44 # Verify data after the test has been "shot" 45 <verify> 46 <strip> 47 ^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).* 48 </strip> 49 <protocol> 50 POST /we/want/%TESTNUMBER HTTP/1.1 51 Host: %HOSTIP:%HTTPPORT 52 User-Agent: curl/%VERSION 53 Accept: */* 54 Content-Length: 1006 55 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32 56 57 ------------------------------24e78000bd32 58 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER%22.txt" 59 Content-Type: mo/foo 60 61 foo bar 62 This is a bar foo 63 bar 64 foo 65 66 ------------------------------24e78000bd32 67 Content-Disposition: form-data; name="file2"; filename="test%TESTNUMBER%22.txt" 68 Content-Type: text/plain 69 70 foo bar 71 This is a bar foo 72 bar 73 foo 74 75 ------------------------------24e78000bd32 76 Content-Disposition: form-data; name="file3" 77 Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b 78 79 Content-Disposition: attachment; filename="test%TESTNUMBER%22.txt" 80 Content-Type: m/f 81 82 foo bar 83 This is a bar foo 84 bar 85 foo 86 87 Content-Disposition: attachment; filename="test%TESTNUMBER%22.txt" 88 Content-Type: text/plain 89 90 foo bar 91 This is a bar foo 92 bar 93 foo 94 95 96 ------------------------------24e78000bd32-- 97 </protocol> 98 </verify> 99 </testcase>