문제

I am trying to use a windows 7 batch file to download a files from my website.

This command works :

curl -v http://jsonlint.com/c/images/logo_arc90.png > j.jpg

This one does not :

curl -v http://starlords3k.com/images/star_1001.png > s.jpg

I get the following error: HTTP/1.1 406 Not Acceptable

Is there something I need to configure on the server to allow the download?

OR What am I missing?

도움이 되었습니까?

해결책

Faking the User-Agent to Mozilla fixed the issue:

curl http://starlords3k.com/images/star_1001.png > s.jpg -A "Mozilla"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top