那些日子里

记录生活的点滴

Linux下telnet验证HTTP协议的头信息

without comments

root@ubuntu:/home/huotuotuofly/cProgram# telnet www.thosedays.us 80

Trying 204.74.210.128…

Connected to www.thosedays.us.

Escape character is ‘^]’.      //连接成功

GET /index.html HTTP/1.0   //发送请求
HTTP/1.1 200 OK               //响应头信息

Date: Sat, 12 Mar 2011 10:19:31 GMT

Server: Apache/2

Last-Modified: Sun, 26 Sep 2010 21:08:25 GMT

ETag: “5f7003e-f4-4913003336440″

Accept-Ranges: bytes

Content-Length: 244

Vary: Accept-Encoding,User-Agent

Connection: close

Content-Type: text/html
<html><head><title>Shared IP</title></head><body><center>This IP is being shared among many domains.<br>To view the domain you are looking for, simply enter the domain name in the location bar of your web browser.<br></center></body></html>Connection closed by foreign host.    //非独立IP就会这么显示,因为telnet连接的是IP而非Domain Name.

 

后面想顺便telnet下百度来着,却发现了件有趣的事:

root@ubuntu:/home/huotuotuofly/cProgram# telnet www.baidu.com 80

Trying 119.75.217.56…

Connected to www.a.shifen.com.

Escape character is ‘^]’.

GET /index.html HTTP/1.0

 

………

shifen.com是神马东东?鼓鼓之才知道原来百度最早的竞价排名系统就叫“十分”,因为百度每次点击最便宜十分钱- -详情见

 

Written by huotuotuofly

三月 12th, 2011 at 3:09 上午

Posted in Linux,学习

Leave a Reply

CommentLuv badge