Add test scenario pac-file-delivery
[privoxy.git] / tests / cts / pac-file-delivery / data / test1
1 <testcase>
2 <info>
3 <keywords>
4 HTTPS
5 HTTP GET
6 </keywords>
7 </info>
8
9 <reply>
10 <data>
11 HTTP/1.1 200 OK
12 Connection: close
13 Content-Type: text/html
14 Content-Length: 18
15
16 Here's your data.
17 </data>
18 </reply>
19
20 <proxy-reply>
21 <data>
22 function FindProxyForURL(url, host) {
23     var proxy = "PROXY 127.0.0.1:9119; DIRECT";
24     var direct = "DIRECT";
25     if (isPlainHostName(host)) {
26         return direct;
27     }
28     if (url.substring(0, 4) == "ftp:" || url.substring(0, 6) == "rsync:") {
29         return direct;
30     }
31     return proxy;
32 }
33 </data>
34 </proxy-reply>
35
36 <client>
37 <server>
38 none
39 </server>
40 <name>
41 CGI request for PAC file
42 </name>
43 <command option="no-include">
44 http://config.privoxy.org/wpad.dat
45 </command>
46 </client>
47
48 <verify>
49 </verify>
50 </testcase>