From 39d7e229bdefe143a0cce2ad782aed4d7ddfe894 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Sun, 1 Aug 2010 23:44:49 +0000 Subject: 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 --- src/couchdb/couch_httpd.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -> -- cgit v1.2.3