nsurl: Add data to scheme type enum.

This commit is contained in:
Michael Drake 2018-08-09 15:34:38 +01:00
parent ca0514ea92
commit bc280f0e3f
2 changed files with 12 additions and 1 deletions

View File

@ -302,6 +302,16 @@ static void nsurl__get_string_markers(const char * const url_s,
((*(pos - off + 5) == 'o') ||
(*(pos - off + 5) == 'O')))) {
marker.scheme_type = NSURL_SCHEME_MAILTO;
} else if (off == SLEN("data") &&
(((*(pos - off + 0) == 'd') ||
(*(pos - off + 0) == 'D')) &&
((*(pos - off + 1) == 'a') ||
(*(pos - off + 1) == 'A')) &&
((*(pos - off + 2) == 't') ||
(*(pos - off + 2) == 'T')) &&
((*(pos - off + 3) == 'a') ||
(*(pos - off + 3) == 'A')))) {
marker.scheme_type = NSURL_SCHEME_DATA;
}
/* Skip over colon */

View File

@ -36,7 +36,8 @@ enum nsurl_scheme_type {
NSURL_SCHEME_HTTPS,
NSURL_SCHEME_FILE,
NSURL_SCHEME_FTP,
NSURL_SCHEME_MAILTO
NSURL_SCHEME_MAILTO,
NSURL_SCHEME_DATA
};