mirror of https://github.com/scrapy/scrapy.git
core: add application/xhtml+xml support to responsetypes
more info at http://www.w3.org/TR/xhtml-media-types/#media-types --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40977
This commit is contained in:
parent
63e6ce6e47
commit
67ab30a5ba
|
|
@ -16,6 +16,7 @@ class ResponseTypes(object):
|
|||
|
||||
CLASSES = {
|
||||
'text/html': 'scrapy.http.HtmlResponse',
|
||||
'application/xhtml+xml': 'scrapy.http.HtmlResponse',
|
||||
'application/xml': 'scrapy.http.XmlResponse',
|
||||
'text/xml': 'scrapy.http.XmlResponse',
|
||||
'text': 'scrapy.http.TextResponse',
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class ResponseTypesTest(unittest.TestCase):
|
|||
mappings = [
|
||||
('text/html; charset=UTF-8', HtmlResponse),
|
||||
('text/xml; charset=UTF-8', XmlResponse),
|
||||
('application/xhtml+xml; charset=UTF-8', HtmlResponse),
|
||||
('application/xml; charset=UTF-8', XmlResponse),
|
||||
('application/octet-stream', Response),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue