mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
A URI scheme must start with a letter, even if later more characters are
2008-05-13 Bastien Nocera <hadess@hadess.net> * gfile.c (has_valid_scheme): A URI scheme must start with a letter, even if later more characters are allowed (#532852) svn path=/trunk/; revision=6887
This commit is contained in:
parent
6ff895239a
commit
a495d32f36
@ -1,3 +1,8 @@
|
||||
2008-05-13 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* gfile.c (has_valid_scheme): A URI scheme must start with a
|
||||
letter, even if later more characters are allowed (#532852)
|
||||
|
||||
2008-05-05 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* Makefile.am. build with G_DISABLE_SINGLE_INCLUDES to prevent
|
||||
|
@ -4714,6 +4714,9 @@ is_valid_scheme_character (char c)
|
||||
return g_ascii_isalnum (c) || c == '+' || c == '-' || c == '.';
|
||||
}
|
||||
|
||||
/* Following RFC 2396, valid schemes are built like:
|
||||
* scheme = alpha *( alpha | digit | "+" | "-" | "." )
|
||||
*/
|
||||
static gboolean
|
||||
has_valid_scheme (const char *uri)
|
||||
{
|
||||
@ -4721,7 +4724,7 @@ has_valid_scheme (const char *uri)
|
||||
|
||||
p = uri;
|
||||
|
||||
if (!is_valid_scheme_character (*p))
|
||||
if (!g_ascii_isalpha (*p))
|
||||
return FALSE;
|
||||
|
||||
do {
|
||||
|
Loading…
x
Reference in New Issue
Block a user