Merge branch 'mc/credential-helper-www-authenticate'
Allow information carried on the WWW-AUthenticate header to be passed to the credential helpers. * mc/credential-helper-www-authenticate: credential: add WWW-Authenticate header to cred requests http: read HTTP WWW-Authenticate response headers t5563: add tests for basic and anoymous HTTP access
This commit is contained in:
@@ -1288,6 +1288,25 @@ static inline int skip_iprefix(const char *str, const char *prefix,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Like skip_prefix_mem, but compare case-insensitively. Note that the
|
||||
* comparison is done via tolower(), so it is strictly ASCII (no multi-byte
|
||||
* characters or locale-specific conversions).
|
||||
*/
|
||||
static inline int skip_iprefix_mem(const char *buf, size_t len,
|
||||
const char *prefix,
|
||||
const char **out, size_t *outlen)
|
||||
{
|
||||
do {
|
||||
if (!*prefix) {
|
||||
*out = buf;
|
||||
*outlen = len;
|
||||
return 1;
|
||||
}
|
||||
} while (len-- > 0 && tolower(*buf++) == tolower(*prefix++));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int strtoul_ui(char const *s, int base, unsigned int *result)
|
||||
{
|
||||
unsigned long ul;
|
||||
|
||||
Reference in New Issue
Block a user