summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/httpexceptions.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyramid/httpexceptions.py b/pyramid/httpexceptions.py
index 422f2f27f..893795c11 100644
--- a/pyramid/httpexceptions.py
+++ b/pyramid/httpexceptions.py
@@ -248,10 +248,10 @@ ${body}''')
comment = self.comment or ''
accept_value = environ.get('HTTP_ACCEPT', '')
accept = MIMEAccept(accept_value)
- match = accept.best_match(
- ['text/plain',
- 'text/html',
- 'application/json'], default_match='text/plain')
+ # Attempt to match text/html or application/json, if those don't
+ # match, we will always have our default of text/plain
+ match = accept.best_match(['text/html', 'application/json'],
+ default_match='text/plain')
if match == 'text/html':
self.content_type = 'text/html'