summaryrefslogtreecommitdiff
path: root/paste/wsgiwrappers.py
diff options
context:
space:
mode:
authorpjenvey <devnull@localhost>2007-07-14 19:15:46 +0000
committerpjenvey <devnull@localhost>2007-07-14 19:15:46 +0000
commitb48669fbd0156ee8fed46262bb6406d885ad0568 (patch)
tree75901fa15e9ad315457350ba471b326ff9df365b /paste/wsgiwrappers.py
parentfa82c74b8264a35c2fe0880b721cdbb45e28ec8d (diff)
downloadpaste-b48669fbd0156ee8fed46262bb6406d885ad0568.tar.gz
o fixed WSGIResponse default headers only being inherited when a mimetype was specified
o default WSGIRequest's decoding error handler to 'replace'. if sent bad data, it's more appropriate to just convert it to bad unicode data instead of raising an exception
Diffstat (limited to 'paste/wsgiwrappers.py')
-rw-r--r--paste/wsgiwrappers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py
index 334a5c2..99a57fc 100644
--- a/paste/wsgiwrappers.py
+++ b/paste/wsgiwrappers.py
@@ -99,7 +99,7 @@ class WSGIRequest(object):
You are free to subclass this object.
"""
- defaults = StackedObjectProxy(default=dict(charset=None, errors='strict',
+ defaults = StackedObjectProxy(default=dict(charset=None, errors='replace',
decode_param_names=False,
language='en-us'))
def __init__(self, environ):
@@ -312,7 +312,7 @@ class WSGIResponse(object):
charset = defaults.get('charset')
if charset:
mimetype = '%s; charset=%s' % (mimetype, charset)
- self.headers.update(defaults.get('headers', {}))
+ self.headers.update(defaults.get('headers', {}))
self.headers['Content-Type'] = mimetype
self.errors = defaults.get('errors', 'strict')