summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-04-12 20:17:29 -0600
committerBert JW Regeer <bertjw@regeer.org>2016-04-12 20:21:43 -0600
commitd9d194b62706dccb8d8b77cff3e424a1947f0e80 (patch)
tree797af0aa905edba5a739af98172e8c2122b510c6
parentcb67e01c07be14994229f584d8b6b6edcf84da78 (diff)
downloadpyramid-d9d194b62706dccb8d8b77cff3e424a1947f0e80.tar.gz
pyramid-d9d194b62706dccb8d8b77cff3e424a1947f0e80.tar.bz2
pyramid-d9d194b62706dccb8d8b77cff3e424a1947f0e80.zip
Use MIMEAccept not Accept
Accept doesn't understand the notation of major/minor masks.
-rw-r--r--pyramid/httpexceptions.py4
1 files 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',