关于服务器(自己写的tomcat小服务器程序)应答浏览器请求信息

应答行 : 协议版本  状态码  描述信息
HTTP/1.1 200 OK
应答头:属性
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"164-1369635683312"
Last-Modified: Mon, 27 May 2013 06:21:23 GMT
Content-Type: text/html
Content-Length: 164
Date: Sat, 11 Jan 2014 08:10:54 GMT
Connection: close
空行
应答体
<html>
 <head>
  <title>我的网页标题</title>
 </head>
 <body>
  <font color="red" size="7">欢迎光临,我的主页!</font>
  <img src="4.jpg"/>
 </body>
</html>

 

和浏览器请求信息类型一致。

其中连接方式我改为了close

由于浏览器解析这块实在不会,所以只能是得到html源码了。

posted @ 2015-04-08 19:42  CodeWolf  阅读(195)  评论(0编辑  收藏  举报