xref: /curl/tests/data/test536 (revision cc04c736)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7CURLOPT_PROXY
8CURLOPT_NOBODY
9CURLINFO_USED_PROXY
10</keywords>
11</info>
12
13#
14# Server-side
15<reply>
16<data nocheck="yes">
17HTTP/1.1 200 OK swsclose
18Date: Tue, 09 Nov 2010 14:49:00 GMT
19Server: test-server/fake
20Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
21ETag: "21025-dc7-39462498"
22Accept-Ranges: bytes
23Content-Length: 6
24
25hello
26</data>
27</reply>
28
29#
30# Client-side
31<client>
32<server>
33http
34</server>
35<tool>
36lib%TESTNUMBER
37</tool>
38<name>
39CURLINFO_USED_PROXY
40</name>
41
42# provides:
43# 0 - the proxy URL
44# 1 - the non-proxy using URL
45# 2 - the CURLOPT_RESOLVE string to change IP for the name
46#
47<command>
48http://%HOSTIP:%HTTPPORT goingdirect.com:%HTTPPORT goingdirect.com:%HTTPPORT:%HOSTIP
49</command>
50<features>
51proxy
52</features>
53</client>
54
55#
56# Verify data after the test has been "shot"
57<verify>
58<protocol crlf="yes">
59GET http://usingproxy.com/ HTTP/1.1
60Host: usingproxy.com
61Accept: */*
62Proxy-Connection: Keep-Alive
63
64GET / HTTP/1.1
65Host: goingdirect.com:%HTTPPORT
66Accept: */*
67
68</protocol>
69<stdout mode="text">
70hello
71This used the proxy
72hello
73This DID NOT use the proxy
74</stdout>
75</verify>
76</testcase>
77