diff options
author | David Robillard <d@drobilla.net> | 2017-06-29 12:21:09 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-06-29 12:21:09 -0400 |
commit | 195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8 (patch) | |
tree | 952b067c7ace8afb1f78cb51ac032d18565c94a8 /src/serd_internal.h | |
parent | 21211d73053d0a66a1da601472c68598cfc53595 (diff) | |
download | serd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.tar.gz serd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.tar.bz2 serd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.zip |
Fix strict parsing of abolute URI schemes
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r-- | src/serd_internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h index affdd31f..297b4507 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -368,6 +368,17 @@ uri_is_under(const SerdURI* uri, const SerdURI* root) return true; } +static inline bool +is_uri_scheme_char(const uint8_t c) +{ + switch (c) { + case ':': case '+': case '-': case '.': + return true; + default: + return is_alpha(c) || is_digit(c); + } +} + /* Error reporting */ static inline void |