Why does this not work:
curl -X HEAD http://www.google.com
But these both work just fine:
curl -I http://www.google.com curl -
curl --head https://www.example.net
I was pointed to this by curl itself; when I issued the command with -X HEAD, it printed:
-X HEAD
Warning: Setting custom HTTP method to HEAD with -X/--request may not work the Warning: way you want. Consider using -I/--head instead.