http://
part. That tells which protocol the URL uses. The scheme must be a known one that this version of curl supports or it will show an error message and stop. Additionally, the scheme must neither start with nor contain any whitespace.://
sequence. That is a colon and two forward slashes. There exists URL formats with only one slash, but curl does not support any of them. There are two additional notes to be aware of, about the number of slashes:file://
URLs are written as file://<hostname>/<path>
but the only hostnames that are okay to use are localhost
, 127.0.0.1
or a blank (nothing at all):file:///path/to/file
). That is three slashes before the path. That is again an area with common mistakes and where browsers allow users to use the wrong syntax so as a special exception, curl on Windows also allows this incorrect format:--proto-default
option.