summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-12-22 19:11:07 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-12-22 19:11:07 +0000
commit7b10d890600660d116b0fd1891d682982a5d106c (patch)
tree82a398c291f7dc8487f0cf85469c9571c7bd46a5 /src
parentb07ccd6dc1c36c9d8e61de237b18aebd1b5de06d (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_util.erl4
1 files changed, 2 insertions, 2 deletions
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;