xref: /curl/tests/data/test728 (revision fb4415d8)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6SOCKS5
7SOCKS5h
8followlocation
9</keywords>
10</info>
11
12#
13# Server-side
14<reply>
15# The hostname in this redirect is 256 characters and too long (> 255) for
16# SOCKS5 remote resolve. curl must return error CURLE_PROXY in this case.
17<data>
18HTTP/1.1 301 Moved Permanently
19Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
20Content-Length: 0
21Connection: close
22
23</data>
24</reply>
25
26#
27# Client-side
28<client>
29<features>
30proxy
31</features>
32<server>
33http
34socks5
35</server>
36 <name>
37SOCKS5h with HTTP redirect to hostname too long
38 </name>
39 <command>
40--no-progress-meter --location --proxy socks5h://%HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
41</command>
42</client>
43
44#
45# Verify data after the test has been "shot"
46<verify>
47<protocol crlf="yes">
48GET /%TESTNUMBER HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50User-Agent: curl/%VERSION
51Accept: */*
52
53</protocol>
54<errorcode>
5597
56</errorcode>
57# the error message is verified because error code CURLE_PROXY (97) may be
58# returned for any number of reasons and we need to make sure it is
59# specifically for the reason below so that we know the check is working.
60<stderr mode="text">
61curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy.
62</stderr>
63</verify>
64</testcase>
65