summaryrefslogtreecommitdiff
path: root/paste/httpexceptions.py
diff options
context:
space:
mode:
authorbbangert <devnull@localhost>2006-05-29 21:54:51 +0000
committerbbangert <devnull@localhost>2006-05-29 21:54:51 +0000
commit064a4b61f09111be9d1c13624cf8bd08a39a9967 (patch)
tree4450a0061f5394e46e146e302f72c6e9a9e4a6ad /paste/httpexceptions.py
parentd841ca4fe1f0b3547cc01cfe3e0b8714a5751cfd (diff)
downloadpaste-064a4b61f09111be9d1c13624cf8bd08a39a9967.tar.gz
Fixed issue with Safari and http exceptions since Safari sends */* as Accept, lets return text/html if the Accept is */* or has html in it.
Diffstat (limited to 'paste/httpexceptions.py')
-rw-r--r--paste/httpexceptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py
index 3ade878..6bddf9b 100644
--- a/paste/httpexceptions.py
+++ b/paste/httpexceptions.py
@@ -228,7 +228,8 @@ class HTTPException(Exception):
headers = list(self.headers)
else:
headers = []
- if 'html' in environ.get('HTTP_ACCEPT',''):
+ if 'html' in environ.get('HTTP_ACCEPT','') or \
+ '*/*' in environ.get('HTTP_ACCEPT',''):
replace_header(headers, 'content-type', 'text/html')
content = self.html(environ)
else: