Add test scenario chunked-transfer-encoding
[privoxy.git] / tests / cts / chunked-transfer-encoding / data / test29
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 chunked transfer encoding
7 </keywords>
8 </info>
9
10 <reply>
11 <data>
12 HTTP/1.1 200 OK\r
13 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
14 Connection: keep-alive\r
15 Content-Type: text/html\r
16 Transfer-Encoding: chunked\r
17 \r
18 FE\r
19 %repeat[253 x A]%
20 \r
21 FB\r
22 %repeat[50 x 0%0d%0a%0d%0a]%
23 \r
24 0\r
25 \r
26 </data>
27 <data1>
28 HTTP/1.1 200 OK\r
29 Date: Thu, 22 Jul 2010 11:22:33 GMT\r
30 Connection: close\r
31 X-Connection: swsclose\r
32 Content-Type: text/html\r
33 \r
34 Here's your unchunked data.
35 </data1>
36 # The write size is chosen so that Privoxy's second read
37 # gets data that ends in 0\r\n\r\n but does not actually
38 # contain the last chunk.
39 <servercmd>
40 writesize: 306
41 writedelay: 100
42 </servercmd>
43 </reply>
44
45 <client>
46 <server>
47 http
48 </server>
49 <name>
50 Chunked transfer encoding - Chunk that contains lots of potential "last-chunks" as data. Filtering disabled.
51 </name>
52 <features>
53 proxy
54 </features>
55 # Set a custom User-Agent so the request size does
56 # not depend on whether or not curl is a debug build.
57 <command>
58 --user-agent "Blafasel/1 beta" --raw http://%HOSTIP:%HTTPPORT/no-filter/chunked-content/%TESTNUMBER0000 --max-time 2 --raw http://%HOSTIP:%HTTPPORT/no-filter/unchunked-content/%TESTNUMBER0001
59 </command>
60 </client>
61
62 <verify>
63 <protocol>
64 GET /no-filter/chunked-content/%TESTNUMBER0000 HTTP/1.1\r
65 Host: %HOSTIP:%HTTPPORT\r
66 User-Agent: Blafasel/1 beta\r
67 Accept: */*\r
68 \r
69 GET /no-filter/unchunked-content/%TESTNUMBER0001 HTTP/1.1\r
70 Host: %HOSTIP:%HTTPPORT\r
71 User-Agent: Blafasel/1 beta\r
72 Accept: */*\r
73 \r
74 </protocol>
75 <errorcode>
76 0
77 </errorcode>
78 </verify>
79 </testcase>