altsvc: rewrite parser using strparse

Extend test 1654.

Closes #16454
This commit is contained in:
Daniel Stenberg 2025-02-24 15:29:13 +01:00
parent 5b5e2f7318
commit d485177151
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 135 additions and 144 deletions

View file

@ -31,6 +31,12 @@ void Curl_str_init(struct Curl_str *out)
out->len = 0;
}
void Curl_str_assign(struct Curl_str *out, const char *str, size_t len)
{
out->str = str;
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 Curl_str_until(const char **linep, struct Curl_str *out,