[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Is XML text?

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-05-15 12:26:33 CEST

Should we treat XML mime-types as text? Users keep requesting this.

Index: validate.c
===================================================================
--- validate.c (revision 9722)
+++ validate.c (working copy)
@@ -65,8 +65,11 @@
 svn_boolean_t
 svn_mime_type_is_binary (const char *mime_type)
 {
+ const int len = strlen (mime_type);
   return ((strncmp (mime_type, "text/", 5) != 0)
           && (strcmp (mime_type, "image/x-xbitmap") != 0)
           && (strcmp (mime_type, "image/x-xpixmap") != 0)
+ && (len < 4 || strcmp (&mime_type[len-4], "+xml") != 0)
+ && (len < 4 || strstr (mime_type, "/xml") == NULL)
           );
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 15 12:26:59 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.