免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12962 | 回复: 6
打印 上一主题 下一主题

[proxy] squid 发生 Invalid Request 会是什么问题呢? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-05 14:55 |只看该作者 |倒序浏览
浏览器中访问,出现:

ERROR
The requested URL could not be retrieved

While trying to process the request:

GET *URL* HTTP/1.1
Host: *HOST*
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0



The following error was encountered:

    * Invalid Request

Some aspect of the HTTP Request is invalid. Possible problems:

    * Missing or unknown request method
    * Missing URL
    * Missing HTTP Identifier (HTTP/1.0)
    * Request is too large
    * Content-Length missing for POST or PUT requests
    * Illegal character in hostname; underscores are not allowed

Your cache administrator is webmaster.
Generated Mon, 05 Mar 2007 06:46:59 GMT by *HOST* (squid/2.6.STABLE9)


---
日志如下:

2007/03/05 14:46:56| Ready to serve requests.
2007/03/05 14:46:59| clientReadRequest: FD 11 (192.168.1.5:34061) Invalid Request

会是哪方面问题呢?

论坛徽章:
0
2 [报告]
发表于 2007-08-07 11:30 |只看该作者
我也遇到了同样的问题,不知道是为什么。看lOG就提示404 deny的一些信息

论坛徽章:
0
3 [报告]
发表于 2007-08-07 11:55 |只看该作者
* Illegal character in hostname; underscores are not allowed

字符串非法,不支持带下划线的路径。

编译的时候加上该参数

--enable-underscore
允许解析的URL中出现下划线,因为默认squid会认为带下划线的URL地址是非法的,并拒绝访问该地址。

论坛徽章:
0
4 [报告]
发表于 2007-08-09 17:52 |只看该作者

cachemgr.cgi不能用,Invalid URL错误

我这边也出现同样的问题,可是重新编译,configure命令不支持“--enable-underscore
”参数啊。我用的是'squid 2.6.STABLE12' 。
是版本的问题吗?还是其它,希望有人给个答复。:wink:

论坛徽章:
0
5 [报告]
发表于 2007-08-09 17:57 |只看该作者
解决方法已经帖出来了
看下面这个帖子
http://bbs.chinaunix.net/thread-973955-1-1.html

兄弟们不要太懒了。

论坛徽章:
0
6 [报告]
发表于 2007-08-10 10:02 |只看该作者

关于squid不能识别带下划线的地址的问题

西门飞,谢谢你上述的解释。可是使用过以上的方法后,还是不行。现在在网上又查到了一个方法:
“To make Squid allow underscores in hostnames, add this line to src/squid.h:

        #define ALLOW_HOSTNAME_UNDERSCORES 1

and then recompile. ”
还没有测试,不知道能否解决问题。

论坛徽章:
0
7 [报告]
发表于 2007-08-10 10:14 |只看该作者
不应该看网上的,你应该看你的 squid.conf 里的 关于哪个参数的部分。

或者看看你的 squid 的安装包里的 change log   
就是  RELEASENOTES.html  这个和文档。
在 2.6.14 版里有的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP