tool_paramhlp: --proto only supports one modifier
No binary (build failed)
—
(log yok)
| @@ -18,7 +18,7 @@ Example: | |
| Limit what protocols to allow for transfers. Protocols are evaluated left to | |
| right, are comma separated, and are each a protocol name or 'all', optionally | |
| - | prefixed by zero or more modifiers. Available modifiers are: |
| + | prefixed by a modifier. Available modifiers are: |
| ## + | |
| Permit this protocol in addition to protocols already permitted (this is | |
| @@ -482,7 +482,8 @@ ParameterError proto2num(const char * const *val, char **ostr, const char *str) | |
| if no protocols are allowed */ | |
| if(action == set) | |
| protoset[0] = NULL; | |
| - | warnf("unrecognized protocol '%s'", buffer); |
| + | errorf("unrecognized protocol '%s'", buffer); |
| + | return PARAM_BAD_USE; |
| } | |
| } | |
| if(next) | |
| @@ -348,6 +348,7 @@ TESTCASES = \ | |
| test319 \ | |
| test320 \ | |
| test321 \ | |
| + | test322 \ |
| test325 \ | |
| test326 \ | |
| test327 \ | |
| @@ -0,0 +1,31 @@ | |
| + | <?xml version="1.0" encoding="US-ASCII"?> |
| + | <testcase> |
| + | <info> |
| + | <keywords> |
| + | --proto |
| + | </keywords> |
| + | </info> |
| + | |
| + | <client> |
| + | <features> |
| + | http |
| + | </features> |
| + | <name> |
| + | --proto with multiple modifiers |
| + | </name> |
| + | <command> |
| + | http://localhost/wont-get-this --proto +-http |
| + | </command> |
| + | </client> |
| + | |
| + | <verify> |
| + | <errorcode> |
| + | 2 |
| + | </errorcode> |
| + | <stderr mode="text"> |
| + | curl: unrecognized protocol '-http' |
| + | curl: option --proto: is badly used here |
| + | curl: try 'curl --help' or 'curl --manual' for more information |
| + | </stderr> |
| + | </verify> |
| + | </testcase> |