Telnet HTTP免费服务器限制

时间:2013-11-11 04:22:37

标签: http request telnet

我想使用telnet获取整个页面:

的telnet o test.bugs3.com 80 GET / HTTP / 1.0

实际上我几乎可以获得任何网站,但这个。其他免费服务器也会出现同样的问题。我只是想知道究竟是什么导致了这样的限制。 请求如下:

Connected.
HTTP/1.1 200 OK
Server:
Date: Mon, 11 Nov 2013 04:11:47 GMT
Content-Type: text/html
Content-Length: 328
Last-Modified: Thu, 16 May 2013 12:17:53 GMT
Connection: close
Accept-Ranges: bytes

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>Account unavailable</title>
</head><body>

<h1>Account unavailable</h1>

<p>Maybe account have been moved, deleted, suspended or not activated yet.

<p>The requested resource could not be found but may be available again in
the future.

<hr>
</body></html>

1 个答案:

答案 0 :(得分:0)

这是因为您没有发送Host: test.bugs3.com\r\n标头。 RFC 2616 #14.23:“客户端必须在所有HTTP / 1.1请求消息中包含主机头字段。”