Skip to content

Commit

Permalink
gen.pl: error on duplicated See-Also fields
Browse files Browse the repository at this point in the history
Updated http2.d accordingly.
  • Loading branch information
bagder committed Apr 11, 2023
1 parent aafb79d commit 5a3f535
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/cmdline-opts/gen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ sub single {
$protocols=$1;
}
elsif(/^See-also: *(.*)/i) {
if($seealso) {
print STDERR "ERROR: duplicated See-also in $f\n";
return 1;
}
$seealso=$1;
}
elsif(/^Requires: *(.*)/i) {
Expand Down
5 changes: 2 additions & 3 deletions docs/cmdline-opts/http2.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ Protocols: HTTP
Added: 7.33.0
Mutexed: http1.1 http1.0 http2-prior-knowledge http3
Requires: HTTP/2
See-also: no-alpn
Help: Use HTTP 2
See-also: http1.1 http3
Help: Use HTTP/2
See-also: http1.1 http3 no-alpn
Category: http
Example: --http2 $URL
Multi: mutex
Expand Down
8 changes: 7 additions & 1 deletion src/tool_getparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ static const struct LongShort aliases[]= {
{"04", "http3", ARG_NONE},
{"05", "http3-only", ARG_NONE},
{"09", "http0.9", ARG_BOOL},
{"0a", "proxy-http2", ARG_BOOL},
{"1", "tlsv1", ARG_NONE},
{"10", "tlsv1.0", ARG_NONE},
{"11", "tlsv1.1", ARG_NONE},
Expand Down Expand Up @@ -1449,6 +1450,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
/* Allow HTTP/0.9 responses! */
config->http09_allowed = toggle;
break;
case 'a':
/* --proxy-http2 */
config->proxyver = CURLPROXY_HTTPS2;
break;
}
break;
case '1': /* --tlsv1* options */
Expand Down Expand Up @@ -2373,7 +2378,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
default:
/* --proxy */
GetStr(&config->proxy, nextarg);
config->proxyver = CURLPROXY_HTTP;
if(config->proxyver != CURLPROXY_HTTPS2)
config->proxyver = CURLPROXY_HTTP;
break;
}
break;
Expand Down

0 comments on commit 5a3f535

Please sign in to comment.