From d9d194b62706dccb8d8b77cff3e424a1947f0e80 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 12 Apr 2016 20:17:29 -0600 Subject: Use MIMEAccept not Accept Accept doesn't understand the notation of major/minor masks. --- pyramid/httpexceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/httpexceptions.py b/pyramid/httpexceptions.py index ef1e5c144..5500a0a29 100644 --- a/pyramid/httpexceptions.py +++ b/pyramid/httpexceptions.py @@ -130,7 +130,7 @@ from string import Template from zope.interface import implementer from webob import html_escape as _html_escape -from webob.acceptparse import Accept +from webob.acceptparse import MIMEAccept from pyramid.compat import ( class_types, @@ -247,7 +247,7 @@ ${body}''') html_comment = '' comment = self.comment or '' accept_value = environ.get('HTTP_ACCEPT', '') - accept = Accept(accept_value) + accept = MIMEAccept(accept_value) match = accept.best_match( ['application/json', 'text/html', -- cgit v1.2.3