999 Error Code on HEAD request to LinkedIn

前端 未结 4 703
[愿得一人]
[愿得一人] 2020-11-29 05:18

We\'re using a curl HEAD request in a PHP application to verify the validity of generic links. We check the status code just to make sure that the link the user has entered

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 05:37

    I found the workaround, important to set accept-encoding header:

    curl --url "https://www.linkedin.com/in/izman" \
    --header "user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36" \
    --header "accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" \
    --header "accept-encoding:gzip, deflate, sdch, br" \
    | gunzip
    

提交回复
热议问题