summaryrefslogtreecommitdiff
path: root/paste/debug
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-10-10 00:46:32 +0000
committerianb <devnull@localhost>2007-10-10 00:46:32 +0000
commit995b34542ac862830425f09277af2c206f07baa1 (patch)
tree69ce642f7109f610ff42cd7dcaed902a04034740 /paste/debug
parent01398758f8fd83b91e3d7634a37d862a6ad19b34 (diff)
downloadpaste-995b34542ac862830425f09277af2c206f07baa1.tar.gz
keep wdg_validate working when no content-type is set; also look for some other xhtml content types
Diffstat (limited to 'paste/debug')
-rw-r--r--paste/debug/wdg_validate.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/paste/debug/wdg_validate.py b/paste/debug/wdg_validate.py
index 33de61a..119c2d7 100644
--- a/paste/debug/wdg_validate.py
+++ b/paste/debug/wdg_validate.py
@@ -59,9 +59,10 @@ class WDGValidateMiddleware(object):
app_iter.close()
page = output.getvalue()
status, headers = response
- v = wsgilib.header_value(headers, 'content-type')
+ v = wsgilib.header_value(headers, 'content-type') or ''
if (not v.startswith('text/html')
- and not v.startswith('text/xhtml+xml')):
+ and not v.startswith('text/xhtml')
+ and not v.startswith('application/xhtml')):
# Can't validate
# @@: Should validate CSS too... but using what?
return [page]