From 049f315ff453445c1237209f50e02b372f02d179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Fri, 24 Feb 2012 16:16:35 -0200 Subject: [PATCH] Handle as html standard mimetype defined by Open Mobile Alliance --- scrapy/responsetypes.py | 1 + scrapy/tests/test_responsetypes.py | 1 + 2 files changed, 2 insertions(+) diff --git a/scrapy/responsetypes.py b/scrapy/responsetypes.py index 66f3c05db..0d5b44bb7 100644 --- a/scrapy/responsetypes.py +++ b/scrapy/responsetypes.py @@ -22,6 +22,7 @@ class ResponseTypes(object): 'application/rdf+xml': 'scrapy.http.XmlResponse', 'application/rss+xml': 'scrapy.http.XmlResponse', 'application/xhtml+xml': 'scrapy.http.HtmlResponse', + 'application/vnd.wap.xhtml+xml': 'scrapy.http.HtmlResponse', 'application/xml': 'scrapy.http.XmlResponse', 'application/json': 'scrapy.http.TextResponse', 'application/javascript': 'scrapy.http.TextResponse', diff --git a/scrapy/tests/test_responsetypes.py b/scrapy/tests/test_responsetypes.py index 6302380f6..942d22b99 100644 --- a/scrapy/tests/test_responsetypes.py +++ b/scrapy/tests/test_responsetypes.py @@ -32,6 +32,7 @@ class ResponseTypesTest(unittest.TestCase): ('text/html; charset=UTF-8', HtmlResponse), ('text/xml; charset=UTF-8', XmlResponse), ('application/xhtml+xml; charset=UTF-8', HtmlResponse), + ('application/vnd.wap.xhtml+xml; charset=utf-8', HtmlResponse), ('application/xml; charset=UTF-8', XmlResponse), ('application/octet-stream', Response), ]