L A Walsh <[email protected]> writes:
> if wget gets leading spaces in a URL, it complains:
>   "  http://www.kernel.org/pub/linux/utils/util-linux/v2.30: Scheme 
> missing."
>
> Isn't it required for a web client to strip leading spaces from
> URLs?

Strictly speaking, no, because a URL cannot contain spaces, leading or
otherwise.  Generally, Web browsers strip leading and trailing spaces to
make it easier to cut-and-paste links into their location bars, but that
is outside the formality of URLs.  In addition, some browsers will
automatically %-escape any character in a purported URL that isn't
allowed in URLs, which makes it easier for people to circulated
purported URLs that contain invalid characters.

But it seems to me that it is better-defined and safer -- and more in
the Un*x tradition -- to have wget simply give an error if the argument
string isn't a valid URL.

Dale

Reply via email to