curl command return http/1.1 406 not acceptable error

后端 未结 2 1778
失恋的感觉
失恋的感觉 2021-01-11 16:21

I am using below command line curl for knowing if my site supports compressing and caching

curl --head --compress http://www.mysite.com

it retur

2条回答
  •  忘掉有多难
    2021-01-11 17:11

    In some case I had, faking the agent solved this problem, by using:

    curl -A "Mozilla/4.0"
    

    Similarly using libcurl C-API:

    curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/4.0");
    

提交回复
热议问题