999 Error Code on HEAD request to LinkedIn

前端 未结 4 707
[愿得一人]
[愿得一人] 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:36

    It looks like they filter requests based on the user-agent:

    $ curl -I --url https://www.linkedin.com/company/linkedin | grep HTTP
    HTTP/1.1 999 Request denied
    
    $ curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3" -I --url https://www.linkedin.com/company/linkedin | grep HTTP
    HTTP/1.1 200 OK
    

提交回复
热议问题