diff options
Diffstat (limited to 'url.c')
| -rw-r--r-- | url.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3,6 +3,17 @@ #include "strbuf.h" #include "url.h" +/* + * The set of unreserved characters as per STD66 (RFC3986) is + * '[A-Za-z0-9-._~]'. These characters are safe to appear in URI + * components without percent-encoding. + */ +int is_rfc3986_unreserved(char ch) +{ + return isalnum(ch) || + ch == '-' || ch == '_' || ch == '.' || ch == '~'; +} + int is_urlschemechar(int first_flag, int ch) { /* |
