mirror of https://github.com/scrapy/scrapy.git
Test that Content-Disposition takes precedence over body
This commit is contained in:
parent
f538252d3b
commit
68fccc9f04
|
|
@ -265,6 +265,23 @@ PRE_XTRACTMIME_SCENARIOS = (
|
|||
)
|
||||
for protocol in ("http", "https")
|
||||
),
|
||||
*(
|
||||
(
|
||||
{
|
||||
"url": f"{protocol}://example.com/a",
|
||||
"body": b"<?xml",
|
||||
'headers': Headers(
|
||||
{
|
||||
'Content-Disposition': [
|
||||
'attachment; filename="a.html"',
|
||||
],
|
||||
}
|
||||
),
|
||||
},
|
||||
HtmlResponse,
|
||||
)
|
||||
for protocol in ("http", "https")
|
||||
),
|
||||
|
||||
# Without anything else, the body determines the response class.
|
||||
*(
|
||||
|
|
|
|||
Loading…
Reference in New Issue