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

[PATCH] More text MIME types

From: Wilfredo Sánchez <wsanchez_at_apple.com>
Date: 2005-03-22 21:18:22 CET

   The following adds a few more text MIME types to
svn_mime_type_is_binary().

   I'm wondering why this is in code rather than in the config file, so
that as I extend auto-props, I can specify whether new MIME types are
binary or not. For example, I also use application/x-next-plist for
NeXT plist files (used by XCode, EOModeler, etc.), but that's not
standard enough for me to want to include in this patch.

     -wsv

Index: subversion/libsvn_subr/validate.c
===================================================================
--- subversion/libsvn_subr/validate.c (revision 13592)
+++ subversion/libsvn_subr/validate.c (working copy)
@@ -67,6 +67,18 @@
    /* See comment in svn_mime_type_validate() above. */
    const apr_size_t len = strcspn (mime_type, "; ");
    return ((strncmp (mime_type, "text/", 5) != 0)
+ && (len != 17 || strncmp (mime_type, "application/x-csh",
len) != 0)
+ && (len != 24 || strncmp (mime_type,
"application/x-javascript", len) != 0)
+ && (len != 16 || strncmp (mime_type, "application/x-sh",
len) != 0)
+ && (len != 17 || strncmp (mime_type, "application/x-tcl",
len) != 0)
+ && (len != 17 || strncmp (mime_type, "application/x-tex",
len) != 0)
+ && (len != 21 || strncmp (mime_type,
"application/x-texinfo", len) != 0)
+ && (len != 19 || strncmp (mime_type, "application/x-troff",
len) != 0)
+ && (len != 23 || strncmp (mime_type,
"application/x-troff-man", len) != 0)
+ && (len != 22 || strncmp (mime_type,
"application/x-troff-me", len) != 0)
+ && (len != 22 || strncmp (mime_type,
"application/x-troff-ms", len) != 0)
+ && (len != 15 || strncmp (mime_type, "application/xml", len)
!= 0)
+ && (len != 19 || strncmp (mime_type, "application/xml-dtd",
len) != 0)
            && (len != 15 || strncmp (mime_type, "image/x-xbitmap", len)
!= 0)
            && (len != 15 || strncmp (mime_type, "image/x-xpixmap", len)
!= 0)
            );

  • application/pkcs7-signature attachment: smime.p7s
Received on Tue Mar 22 21:20:16 2005

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.