A
A
Alexey R2017-06-22 15:43:09
Computer networks
Alexey R, 2017-06-22 15:43:09

How to connect to HTTP via Telnet?

Good day. Recently I decided to refresh my memory of poorly learned material on the HTTP protocol. And ran into a problem again. Since the protocol works in text mode, I want to connect to it via Telnet. But again, it doesn't work. I work on a MAC, I open a terminal and enter the following command telnet www.adme.ru 80, I connect to the server, as I understand it

Trying 144.76.47.209...
Connected to adme.ru.
Escape character is '^]'.
Next I enter
GET / HTTP/1.1       
HOST:  www.adme.ru
I press enter. And that's it. Nothing happens. Pressing enter again I get
HTTP/1.1 301 Moved Permanently
Server: nginx/1.12.0
Date: Thu, 22 Jun 2017 12:40:38 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: https://www.adme.ru/

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.12.0</center>
</body>
</html>
Please tell me what I'm doing wrong. Do I understand correctly that I should be given a page without tags, but only its text version? Many thanks to everyone for the advice!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-06-22
@Axeles

Everything is going right. When you visit, http://www.adme.ruit redirects you tohttps://www.adme.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question