diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-12-22 19:11:07 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-12-22 19:11:07 +0000 |
commit | 7b10d890600660d116b0fd1891d682982a5d106c (patch) | |
tree | 82a398c291f7dc8487f0cf85469c9571c7bd46a5 /src | |
parent | b07ccd6dc1c36c9d8e61de237b18aebd1b5de06d (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.erl | 4 |
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; |