diff options
author | Ali Fardan <raiz@stellarbound.space> | 2020-11-23 09:56:37 +0300 |
---|---|---|
committer | Ali Fardan <raiz@stellarbound.space> | 2020-11-23 09:56:37 +0300 |
commit | faabb55313f176c52897cf63623ecb5b158ec46d (patch) | |
tree | fedc77d0be9f47c2e9459b4c83b08c661d8e4bcb /types.h | |
parent | 5a66aa1bbace4775025cd99a8ab0a8a18487dfe9 (diff) | |
download | libyuri-faabb55313f176c52897cf63623ecb5b158ec46d.tar.gz |
decode: fix percent encoded first character parser bug
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/types.h b/types.h index 03208d4..4bfc84b 100644 --- a/types.h +++ b/types.h @@ -102,7 +102,14 @@ (_is_unreserved(c) ||\ _is_sub_delim(c) ||\ (c == ':') ||\ - (c == '@')) + (c == '@') ||\ + (c == '%')) + +#define _is_userinfo(c)\ + (_is_unreserved(c) ||\ + _is_sub_delim(c) ||\ + (c == ':') ||\ + (c == '%')) #define _is_segment(c)\ _is_pchar(c) @@ -110,4 +117,6 @@ #define _is_segment_nc(c)\ (_is_unreserved(c) ||\ _is_sub_delim(c) ||\ - (c == '@')) + (c == '@') ||\ + (c == '%')) + |