diff options
author | Robert Newson <rnewson@apache.org> | 2011-01-20 12:59:48 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-01-20 12:59:48 +0000 |
commit | f57948efb95ad460a2bfce3923696e2580561e6b (patch) | |
tree | 0d70cb229615f8eecf7ee6f0e5d563b93cf42bb5 | |
parent | 843ed3da02a829a0e64121c9f7f2b8dbe15d920c (diff) |
COUCHDB-1034 - ignore runs of whitespace between content types in compressible_types list
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1061282 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | etc/couchdb/default.ini.tpl.in | 2 | ||||
-rw-r--r-- | src/couchdb/couch_util.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in index 7ed548de..e8a69f77 100644 --- a/etc/couchdb/default.ini.tpl.in +++ b/etc/couchdb/default.ini.tpl.in @@ -129,7 +129,7 @@ samples = [0, 60, 300, 900] [attachments] compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression -compressible_types = text/*, application/javascript, application/json, application/xml +compressible_types = text/*, application/javascript, application/json, application/xml [replicator] db = _replicator diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl index 3c18bacd..0480f230 100644 --- a/src/couchdb/couch_util.erl +++ b/src/couchdb/couch_util.erl @@ -393,7 +393,7 @@ compressible_att_type(MimeType) when is_binary(MimeType) -> compressible_att_type(MimeType) -> TypeExpList = re:split( couch_config:get("attachments", "compressible_types", ""), - ", ?", + "\\s*,\\s*", [{return, list}] ), lists:any( |