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