summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-08-01 23:44:49 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-08-01 23:44:49 +0000
commit39d7e229bdefe143a0cce2ad782aed4d7ddfe894 (patch)
tree25974bd66315f49384cc4befd3b4c0eda1509a07
parentb13c05880ab66855d41d5556bf898de432507140 (diff)
Merged revision 981348 from trunk:
Bug 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/branches/1.0.x@981349 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 c99251e4..8a5c699a 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -763,7 +763,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 ->