diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-12-22 19:08:23 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-12-22 19:08:23 +0000 |
commit | 0067f2e76ddcb1143d17de73fee878f68286aaae (patch) | |
tree | 6c30b5433711f3107180c0a6a775d6312641f260 /src/couchdb | |
parent | 320cf3955042f2d11ebdefd1a8e5888a3c642521 (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.1.x@1052032 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_util.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl index c11ba994..3c18bacd 100644 --- a/src/couchdb/couch_util.erl +++ b/src/couchdb/couch_util.erl @@ -398,7 +398,8 @@ compressible_att_type(MimeType) -> ), lists:any( fun(TypeExp) -> - Regexp = ["^\\s*", re:replace(TypeExp, "\\*", ".*"), "\\s*$"], + Regexp = ["^\\s*", re:replace(TypeExp, "\\*", ".*"), + "(?:\\s*;.*?)?\\s*", $$], re:run(MimeType, Regexp, [caseless]) =/= nomatch end, [T || T <- TypeExpList, T /= []] |