diff options
author | bbangert <devnull@localhost> | 2006-05-29 21:54:51 +0000 |
---|---|---|
committer | bbangert <devnull@localhost> | 2006-05-29 21:54:51 +0000 |
commit | 064a4b61f09111be9d1c13624cf8bd08a39a9967 (patch) | |
tree | 4450a0061f5394e46e146e302f72c6e9a9e4a6ad /paste/httpexceptions.py | |
parent | d841ca4fe1f0b3547cc01cfe3e0b8714a5751cfd (diff) | |
download | paste-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.py | 3 |
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: |