Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: [PROPOSAL] URL shortcuts
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Andreas Mohr via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 21 Jan 2022 11:27:52 +0100
Hi,
On Fri, Jan 21, 2022 at 09:22:58AM +0100, Daniel Stenberg via curl-users wrote:
> A "URL" that starts with colon (thereby not being a URL at all so the
> command line parser can easily catch when this happens), implies a
> "http://localhost" prefix. Like this:
>
> $ curl :80/
>
> $ curl :8080/index.html
>
> $ curl :/search.cgi?q=crazy
AFAIUI (as an interested by-reader),
this introduces a shortcut specifically for localhost handling.
To which I would ask:
how relevant actually is localhost activity?
For development-focussed people maybe, but
rather not so much for the wider consumer audience.
This would complicate (albeit slightly?)
very "generic" parser handling for
rather "specific" use case: localhost-only.
Another question would be whether
this could introduce concerns such as
security or even just reliability.
After all it is an implicitism
("empty" *) hostname part then means:
do not discard, but handle it as a redirection to localhost)
*) which might easily result from
an erroneously empty/non-existent hostname-providing **) shell variable!
--> silent acceptance (plus delivering WRONG results, since
the connection to the WRONG host happened to work) rather than
direct, reliable failure indication [Fail-Fast].
**) which is not at all uncommon BTW, since
it's exactly a hostname which
is a very dynamic configuration layer element!
That's my thoughts on it, but
quite likely that's only a tiny subset of aspects :)
HTH,
Andreas Mohr
Date: Fri, 21 Jan 2022 11:27:52 +0100
Hi,
On Fri, Jan 21, 2022 at 09:22:58AM +0100, Daniel Stenberg via curl-users wrote:
> A "URL" that starts with colon (thereby not being a URL at all so the
> command line parser can easily catch when this happens), implies a
> "http://localhost" prefix. Like this:
>
> $ curl :80/
>
> $ curl :8080/index.html
>
> $ curl :/search.cgi?q=crazy
AFAIUI (as an interested by-reader),
this introduces a shortcut specifically for localhost handling.
To which I would ask:
how relevant actually is localhost activity?
For development-focussed people maybe, but
rather not so much for the wider consumer audience.
This would complicate (albeit slightly?)
very "generic" parser handling for
rather "specific" use case: localhost-only.
Another question would be whether
this could introduce concerns such as
security or even just reliability.
After all it is an implicitism
("empty" *) hostname part then means:
do not discard, but handle it as a redirection to localhost)
*) which might easily result from
an erroneously empty/non-existent hostname-providing **) shell variable!
--> silent acceptance (plus delivering WRONG results, since
the connection to the WRONG host happened to work) rather than
direct, reliable failure indication [Fail-Fast].
**) which is not at all uncommon BTW, since
it's exactly a hostname which
is a very dynamic configuration layer element!
That's my thoughts on it, but
quite likely that's only a tiny subset of aspects :)
HTH,
Andreas Mohr
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-01-21