406运行wget时不可接受的错误

我在crontab中有这个命令:

wget --quiet --delete-after http://boms.ro/admincp/cron/s/9abf0f42c1e4f55fdb87d8237cdde 

而当我用–debug参数运行它时,我得到以下的回应:

 Caching boms.ro => 188.240.2.30 Created socket 3. Releasing 0x00000000010c97e0 (new refcount 1). ---request begin--- GET /admincp/cron/s/9abf0f42c1e4f55fdb87d8237cdde HTTP/1.0 User-Agent: Wget/1.12 (linux-gnu) Accept: */* Host: boms.ro Connection: Keep-Alive ---request end--- ---response begin--- HTTP/1.0 406 Not Acceptable Date: Thu, 12 Apr 2012 18:29:45 GMT Server: LiteSpeed Connection: Keep-Alive Keep-Alive: timeout=5, max=100 Cache-Control: private, no-cache, max-age=0 Pragma: no-cache Content-Type: text/html Content-Length: 372 ---response end--- Registered socket 3 for persistent reuse. Skipping 372 bytes of body: [<html> <head><title> 406 Not Acceptable </title></head> <body><h1> 406 Not Acceptable </h1> This request is not acceptable<hr /> Powered By <a href='http://www.litespeedtech.com'>LiteSpeed Web Server</a><br /> <font face="Verdana, Arial, Helvetica" size=-1>LiteSpeed Technologies is not responsible for administration and contents of this web site!</font></body></html> ] done. 

我的要求被认为是“不可接受的”?

这个“LiteSpeed”服务器软件包中包含的mod_security (可能是一个坏的包含规则?)可能是原因。

尝试禁用mod_security – 另外,如果是这样的话,那么这个406响应代码的使用非常弱。

406不可接受的含义是你的客户端(在本例中是wget或代理服务器)发送了一个Accept:头,但是服务器无法以它所得到的Accept:头中列出的格式发送文档。 Accept- *头也会导致相同的行为。

由于您的接受标头设置为接受任何MIMEtypes,并且不包括对特定语言或任何内容的请求,所以这可能是http服务器(或正在运行的CGI应用程序)中的一个错误。