Test that Content-Disposition takes precedence over body

This commit is contained in:
Adrián Chaves 2023-01-10 16:45:33 +01:00
parent f538252d3b
commit 68fccc9f04
1 changed files with 17 additions and 0 deletions

View File

@ -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.
*(