使用telnet查看http协议

第一步:
cmd->输入telnet www.sina.com 80
第二步:
按下ctrl + 】 ,打开回显的意思。
第三步:
按下回车,输入 get/http/1.0
第四步:按两下回车,即可查看相关信息。
注意:
操作一定要在5秒之内,否则可能会出现超时无法连接。
显示如下:
get/http/1.0
HTTP/1.0 400 Bad Request
Server: squid/2.6.STABLE21
Date: Mon, 24 Jan 2011 01:42:23 GMT
Content-Type: text/html
Content-Length: 1202
Expires: Mon, 24 Jan 2011 01:42:23 GMT
X-Squid-Error: ERR_INVALID_REQ 0
X-Cache: MISS from xd33-91.HP08040030.sina.com.cn
Proxy-Connection: close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
g/TR/html4/loose.dtd">
                      <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/
html; charset=iso-8859-1">
                          <TITLE>ERROR: The requested URL could not be retrieved
</TITLE>
        <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:ver
dana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
                                                      </HEAD><BODY>
                                                                   <H1>ERROR</H1
>
 <H2>The requested URL could not be retrieved</H2>
                                                  <HR noshade size="1px">
                                                                         <P>

猜你喜欢

转载自babyduncan.iteye.com/blog/892131
今日推荐