summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-08-01 23:43:40 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-08-01 23:43:40 +0000
commit9bf10be83cd9ab2e40779f5a565059bee6407a56 (patch)
treeeba16803eefd29a6978a7ac7eba49fd40906abe2
parent66784cbc76f06ca1c3bdd6a46f4c7b9bd75fb4e9 (diff)
Buf fix - proper RegExp matching to avoid having a case like "hhtml" being considered as "html".
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@981348 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_httpd.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 4d1bd2ea..0aa77c16 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -786,7 +786,8 @@ error_headers(#httpd{mochi_req=MochiReq}=Req, Code, ErrorStr, ReasonStr) ->
Else ->
Else
end,
- case re:run(Accepts, "html", [{capture, none}, caseless]) of
+ case re:run(Accepts, "\\bhtml\\b",
+ [{capture, none}, caseless]) of
nomatch ->
{Code, []};
match ->