From 7b10d890600660d116b0fd1891d682982a5d106c Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Wed, 22 Dec 2010 19:11:07 +0000 Subject: Merged revision 1052031 from trunk: Make sure attachments get compressed when their MIME type lists parameters Closes COUCHDB-996. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1052035 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_util.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl index 7a8ae055..ed6d2b25 100644 --- a/src/couchdb/couch_util.erl +++ b/src/couchdb/couch_util.erl @@ -418,8 +418,8 @@ compressible_att_type(MimeType) -> ), lists:any( fun(TypeExp) -> - Regexp = "^\\s*" ++ - re:replace(TypeExp, "\\*", ".*", [{return, list}]) ++ "\\s*$", + Regexp = ["^\\s*", re:replace(TypeExp, "\\*", ".*"), + "(?:\\s*;.*?)?\\s*", $$], case re:run(MimeType, Regexp, [caseless]) of {match, _} -> true; -- cgit v1.2.3