- 论坛徽章:
- 0
|
使用squid代理服务器下载网页时,会将结尾 URL结尾的“.” 去掉,这是个问题,加点与不加点对应的可能是两个不同的页面。比如“http://www3.vyxjib.info.”,去掉结尾点后就是400错误,只有加点才能下载正常。
curl -Iv http://www3.vyxjib.info.
* About to connect() to www3.vyxjib.info. port 80
* Trying 98.126.84.84... connected
* Connected to www3.vyxjib.info. (98.126.84.84) port 80
> HEAD / HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: www3.vyxjib.info.
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: private
Cache-Control: private
< Date: Fri, 09 Nov 2012 11:05:26 GMT
Date: Fri, 09 Nov 2012 11:05:26 GMT
< Content-Length: 27661
Content-Length: 27661
< Content-Type: text/html
Content-Type: text/html
< Server: Microsoft-IIS/6.0
Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
< Set-Cookie: ASPSESSIONIDCAQBBABD=JAOBFDDCKADMEHILJNCOPLMG; path=/
Set-Cookie: ASPSESSIONIDCAQBBABD=JAOBFDDCKADMEHILJNCOPLMG; path=/
* Connection #0 to host www3.vyxjib.info. left intact
* Closing connection #0
curl -Iv http://www3.vyxjib.info
* About to connect() to www3.vyxjib.info port 80
* Trying 98.126.84.84... connected
* Connected to www3.vyxjib.info (98.126.84.84) port 80
> HEAD / HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: www3.vyxjib.info
> Accept: */*
>
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
< Content-Length: 39
Content-Length: 39
< Content-Type: text/html
Content-Type: text/html
< Date: Fri, 09 Nov 2012 11:05:30 GMT
Date: Fri, 09 Nov 2012 11:05:30 GMT
< Connection: close
Connection: close
* Closing connection #0
|
|