0

我想使用 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>
4

1 回答 1

0

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

于 2013-11-11T06:10:49.203 回答