CURLOPT_DEFAULT_PROTOCOL: added

- Add new option CURLOPT_DEFAULT_PROTOCOL to allow specifying a default
protocol for schemeless URLs.

- Add new tool option --proto-default to expose
CURLOPT_DEFAULT_PROTOCOL.

In the case of schemeless URLs libcurl will behave in this way:

When the option is used libcurl will use the supplied default.

When the option is not used, libcurl will follow its usual plan of
guessing from the hostname and falling back to 'http'.
This commit is contained in:
Nathaniel Waisbrot 2015-08-22 21:49:26 -04:00 committed by Jay Satiro
parent 22cb631198
commit 9756d1da76
21 changed files with 287 additions and 36 deletions

View file

@ -1645,6 +1645,9 @@ typedef enum {
/* Wait/don't wait for pipe/mutex to clarify */
CINIT(PIPEWAIT, LONG, 237),
/* Set the protocol used when curl is given a URL without a protocol */
CINIT(DEFAULT_PROTOCOL, OBJECTPOINT, 238),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;