test728 (1494B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 SOCKS5 7 SOCKS5h 8 followlocation 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> 18 HTTP/1.1 301 Moved Permanently 19 Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/ 20 Content-Length: 0 21 Connection: close 22 23 </data> 24 </reply> 25 26 # 27 # Client-side 28 <client> 29 <features> 30 proxy 31 </features> 32 <server> 33 http 34 socks5 35 </server> 36 <name> 37 SOCKS5h 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"> 48 GET /%TESTNUMBER HTTP/1.1 49 Host: %HOSTIP:%HTTPPORT 50 User-Agent: curl/%VERSION 51 Accept: */* 52 53 </protocol> 54 <errorcode> 55 97 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"> 61 curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy. 62 </stderr> 63 </verify> 64 </testcase>