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 10:05:02 +0200

On Thu, May 04, 2017 at 07:59:27AM +0200, Daniel Stenberg wrote:
> I've submitted a first version of a pull-request [1] that gives the curl
> tool the ability to issue an HTTP "OPTIONS *" request to a server, something
> that isn't previously possible and has been mentioned in the TODO for a
> while.
>
> To send this request a special command line option needs to be used.
>
> What should this option be called? I don't want it to be plain "--options"
> because that doesn't properly reveal that it also sends the asterisk instead
> of the path. You can already do -X OPTIONS to get the path-sending version
> done without this new option.
>
> My current version calls it --optionsstar but I'm not overly happy with this
> name.
>
> Ideas?

This seems a needlessly specific solution. 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/*'". If
some future HTTP standard extends the spec to e.g. allow * as a wildcard (to
make "OPTIONS FOO*" valid) or some other scheme needs more control over the
path, this would still work.

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