Есть http прокси, на localhost:8080. Хочу получить файл из инета. Делаю: telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Пишу: CONNECT myserver.ru:443 HTTP/1.1 HOST myserver.ru:443 Получаю: HTTP/1.1 200 Connection established Via: 1.1 RELAY Пишу: GET http://myserver.ru/test/news.php HTTP/1.0 После этого получаю: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Reason: You're speaking plain HTTP to an SSL-enabled server port.<br /> Instead use the HTTPS scheme to access this URL, please.<br /> <blockquote>Hint: <a href="https://myserver.ru/"><b>https://myserver.ru/</b> </a></blockquote></p> <hr /> <address>Apache/2.0.46 (Red Hat) Server at myserver.ru Port 443</address> </body></html> Connection closed by foreign host. Как сформировать правильный запрос? Что именно надо писать и как правильно работать с http proxy? Пробовал так: GET https://myserver.ru/test/news.php HTTP/1.0 То же самое.
Форум —
Development