Skip to content

Instantly share code, notes, and snippets.

@KhorAMus
Created February 27, 2016 12:13
Show Gist options
  • Save KhorAMus/afacff7f350e25bebb57 to your computer and use it in GitHub Desktop.
Save KhorAMus/afacff7f350e25bebb57 to your computer and use it in GitHub Desktop.
Exercise 1.2
khoramus@khoramus-VirtualBox:~$ telnet e1.ru 80
Trying 212.193.163.6...
Connected to e1.ru.
Escape character is '^]'.
GET /news HTTP/1.1
Host: e1.ru
User-Agent: Mozilla/5.0 (x11; U; Linux i686; ru;rv:1.9b5)G
Firefox/3.0b5
Accept: text/html
Connection: close
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 27 Feb 2016 11:44:16 GMT
Content-Type: text/html
Content-Length: 178
Connection: close
Location: http://www.e1.ru/news
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Connection closed by foreign host.
Подключаемся через telnet к e1.ru. (порт 80)
Отправляем следующий HTTP-запрос:
GET /news HTTP/1.1 (переходим на страницу news, принимая информацию по протоколу версии 1.1)
В ответе указано состояние 301 это означает, что
запрошенный документ был окончательно перенесен на новый URI, указанный в поле Location заголовка ответа.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment