summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]