mirror of
https://github.com/curl/curl.git
synced 2026-04-15 02:11:42 +03:00
tool_getparam: warn if provided header looks malformed
URL: https://fosstodon.org/@galdor/115298664084113519 Closes #18793
This commit is contained in:
parent
150567b0d2
commit
b2ae19eed4
1 changed files with 4 additions and 0 deletions
|
|
@ -1267,6 +1267,10 @@ static ParameterError parse_header(struct OperationConfig *config,
|
|||
}
|
||||
}
|
||||
else {
|
||||
if(!strchr(nextarg, ':') && !strchr(nextarg, ';')) {
|
||||
warnf("The provided %s header '%s' does not look like a header?",
|
||||
(cmd == C_PROXY_HEADER) ? "proxy": "HTTP", nextarg);
|
||||
}
|
||||
if(cmd == C_PROXY_HEADER) /* --proxy-header */
|
||||
err = add2list(&config->proxyheaders, nextarg);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue