liruqi/west-chamber-season-3 — Issue #4: 处理联通的域名查找失败重定向
Author: liruqi
Created: 2012-02-21 07:15:27+00:00
State: open

联通的DNS查询失败后，会解析到一个联通自己的IP，然后重定向。
问题是那个重定向的页面太丑了。。而且误判率比较高，重定向还有缓存。所以打算处理下。

另外，我自己只能查询出北京的解析IP，比如下例中，IP 是 202.106.199.37。其它地区可能不一样。
希望大家能帮忙收集。

$ curl -iv abc.liruqi.info
* About to connect() to abc.liruqi.info port 80 (#0)
* Trying 202.106.199.37... connected
* Connected to abc.liruqi.info (202.106.199.37) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: abc.liruqi.info
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
< Server: nginx/0.5.23
Server: nginx/0.5.23
< Date: Tue, 21 Feb 2012 05:35:37 GMT
Date: Tue, 21 Feb 2012 05:35:37 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 185
Content-Length: 185
< Connection: keep-alive
Connection: keep-alive
< Location: http://bjdnserror4.wo.com.cn:8080?HOST=abc.liruqi.info&R=/&
Location: http://bjdnserror4.wo.com.cn:8080?HOST=abc.liruqi.info&R=/&

<

301 Moved Permanently

301 Moved Permanently

nginx/0.5.23

* Connection #0 to host abc.liruqi.info left intact
* Closing connection #0