glib r6886 - branches/glib-2-16/gio



Author: hadess
Date: Tue May 13 12:42:28 2008
New Revision: 6886
URL: http://svn.gnome.org/viewvc/glib?rev=6886&view=rev

Log:
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)



Modified:
   branches/glib-2-16/gio/ChangeLog
   branches/glib-2-16/gio/gfile.c

Modified: branches/glib-2-16/gio/gfile.c
==============================================================================
--- branches/glib-2-16/gio/gfile.c	(original)
+++ branches/glib-2-16/gio/gfile.c	Tue May 13 12:42:28 2008
@@ -4677,6 +4677,9 @@
   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)
 {
@@ -4684,7 +4687,7 @@
   
   p = uri;
   
-  if (!is_valid_scheme_character (*p))
+  if (!g_ascii_isalpha (*p))
     return FALSE;
 
   do {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]