mirror of
https://github.com/esphome/esphome.git
synced 2025-08-07 19:07:45 +00:00
make sure its bug for bug compat
This commit is contained in:
parent
3c1a781a1c
commit
35ff850894
@ -62,10 +62,7 @@ static UrlMatch parse_url(const char *url_ptr, size_t url_len, bool only_domain)
|
|||||||
// Find domain (everything up to next '/' or end)
|
// Find domain (everything up to next '/' or end)
|
||||||
const char *domain_end = (const char *) memchr(start, '/', end - start);
|
const char *domain_end = (const char *) memchr(start, '/', end - start);
|
||||||
if (!domain_end) {
|
if (!domain_end) {
|
||||||
// No more slashes, entire remaining string is domain
|
// No second slash found - original behavior returns invalid
|
||||||
match.domain = start;
|
|
||||||
match.domain_len = end - start;
|
|
||||||
match.valid = true;
|
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user