From 995b34542ac862830425f09277af2c206f07baa1 Mon Sep 17 00:00:00 2001 From: ianb Date: Wed, 10 Oct 2007 00:46:32 +0000 Subject: keep wdg_validate working when no content-type is set; also look for some other xhtml content types --- paste/debug/wdg_validate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'paste/debug') 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] -- cgit v1.2.1