You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2010/08/02 01:43:40 UTC

svn commit: r981348 - /couchdb/trunk/src/couchdb/couch_httpd.erl

Author: fdmanana
Date: Sun Aug  1 23:43:40 2010
New Revision: 981348

URL: http://svn.apache.org/viewvc?rev=981348&view=rev
Log:
Buf fix - proper RegExp matching to avoid having a case like "hhtml" being considered as "html".

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=981348&r1=981347&r2=981348&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Sun Aug  1 23:43:40 2010
@@ -786,7 +786,8 @@ error_headers(#httpd{mochi_req=MochiReq}
                             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 ->