curl命令返回HTTP / 1.1 406不接受错误 [英] curl command return http/1.1 406 not acceptable error
本文介绍了curl命令返回HTTP / 1.1 406不接受错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用下面的命令行卷曲的知道,如果我的网站支持COM pressing和缓存
I am using below command line curl for knowing if my site supports compressing and caching
卷曲--head --com preSS http://www.mysite.com
返回以下结果。
Http://1.1 406 Not Acceptable
Date: Wed, 28 Dec 2011 07:41:32 GMT
Server: Apache
Content-Type: text/html; charset-iso-8859-1
你怎么看待这个问题呢?
谢谢
what do you think about the problem? Thanks
推荐答案
在某些情况下,我有,伪造代理解决了这个问题,通过使用:
In some case I had, faking the agent solved this problem, by using:
curl -A "Mozilla/4.0"
同样使用 libcurl的C-API
:
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/4.0");
这篇关于curl命令返回HTTP / 1.1 406不接受错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文