diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2010-11-09 16:57:38 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2010-11-09 16:57:38 +0000 |
commit | 4084b2b62be8ca15c4263ea5a53c945380bbb424 (patch) | |
tree | 4618c8e0ced3bbfa30a018082492574e09f5655e /src | |
parent | 3a5ef653409c167cbcc6ec352e3a32467420fd56 (diff) |
tidy up regex for compressible_att_type
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1033093 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_util.erl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl index da3bf511..c11ba994 100644 --- a/src/couchdb/couch_util.erl +++ b/src/couchdb/couch_util.erl @@ -398,14 +398,8 @@ compressible_att_type(MimeType) -> ), lists:any( fun(TypeExp) -> - Regexp = "^\\s*" ++ - re:replace(TypeExp, "\\*", ".*", [{return, list}]) ++ "\\s*$", - case re:run(MimeType, Regexp, [caseless]) of - {match, _} -> - true; - _ -> - false - end + Regexp = ["^\\s*", re:replace(TypeExp, "\\*", ".*"), "\\s*$"], + re:run(MimeType, Regexp, [caseless]) =/= nomatch end, [T || T <- TypeExpList, T /= []] ). |