From 9bf10be83cd9ab2e40779f5a565059bee6407a56 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Sun, 1 Aug 2010 23:43:40 +0000 Subject: 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 --- 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 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 -> -- cgit v1.2.3