You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Wilfredo Sánchez <ws...@apple.com> on 2005/03/22 20:18:22 UTC

[PATCH] More text MIME types

  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)
            );

Re: [PATCH] More text MIME types

Posted by Michael W Thelen <mi...@pietdepsi.com>.
Marcus Rueckert wrote:
>>  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.
>
> how about making this a config option:
> text-mime-types = list
>
> would be more usefull imho.

Yes, actually, it looks like this is issue #1002:
http://subversion.tigris.org/issues/show_bug.cgi?id=1002

--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams

Re: [PATCH] More text MIME types

Posted by Marcus Rueckert <da...@web.de>.
On 2005-03-22 12:18:22 -0800, Wilfredo Sánchez wrote:
> Date: Tue, 22 Mar 2005 12:18:22 -0800
> From: Wilfredo Sánchez <ws...@apple.com>
> Subject: [PATCH] More text MIME types
> To: Subversion Developers <de...@subversion.tigris.org>
> X-Mailer: Apple Mail (2.619.2)
> 
>   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

how about making this a config option:
text-mime-types = list

would be more usefull imho.

darix

-- 
irssi - the client of the smart and beautiful people

              http://www.irssi.de/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org