mirror of
https://github.com/curl/curl.git
synced 2026-08-26 10:43:32 +03:00
hsts: when a dupe host adds subdomains, use that
Otherwise a weaker earlier entry is allowed to override a later more restrictive one. Add test 1638 to verify. Closes #21108
This commit is contained in:
parent
5172ba5475
commit
e1fdbdd16f
6 changed files with 105 additions and 3 deletions
|
|
@ -35,6 +35,15 @@ void curlx_str_assign(struct Curl_str *out, const char *str, size_t len)
|
|||
out->len = len;
|
||||
}
|
||||
|
||||
/* remove bytes from the end of the string, never remove more bytes than what
|
||||
the string holds! */
|
||||
void curlx_str_trim(struct Curl_str *out, size_t len)
|
||||
{
|
||||
DEBUGASSERT(out);
|
||||
DEBUGASSERT(out->len >= len);
|
||||
out->len -= len;
|
||||
}
|
||||
|
||||
/* Get a word until the first DELIM or end of string. At least one byte long.
|
||||
return non-zero on error */
|
||||
int curlx_str_until(const char **linep, struct Curl_str *out,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue