curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Adding "OPTIONS *" support, what to call the option?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 4 May 2017 13:02:22 +0200

On Thu, May 04, 2017 at 11:14:16AM +0200, Daniel Stenberg wrote:
> On Thu, 4 May 2017, Dan Fandrich wrote:
> >Why not something more general, like --raw-url that does no normalization
> >of the URL sent to the server? It would then be used like "curl
> >--send-raw-url -X OPTIONS 'http://example.com/*'".
>
> In this case it isn't really raw, it would actually just need to skip the
> initial slash from the path in the HTTP request. --skip-path-slash ?

One could argue that the initial slash isn't part of the path but rather a
separator. That view is more apparent in the sftp: scheme where
sftp://host/path/file denotes the relative path to the file "path/file" whereas
sftp://host//path/file denotes the absolute path "/path/file". And there have
been requests in the past to be able to undo the path canonicalization that
curl performs (e.g. http://example.com/foo/../bar/baz =>
http://example.com/bar/baz which the more general --raw-url approach would also
allow.

>>> Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-04