De-AMP Content-Disposition: attachment Bypass Test

Site A: test-website-a.pages.dev

Resolves: brave-browser#53486 | Fix: brave-core#34589

What this tests

When a server responds with an AMP page that has Content-Disposition: attachment, Brave's body sniffer should not De-AMP it. The response should be treated as a download, not redirected to the canonical URL.

Test Link

AMP page on Site B with Content-Disposition: attachment

Expected results

Behavior Result
Browser downloads amp-page.html PASS: body sniffer respected Content-Disposition
Browser redirects to this site's canonical page FAIL: body sniffer De-AMPed an attachment response

Canonical target (should not load)

If De-AMP incorrectly processes the attachment, you will be redirected to: test-website-a.pages.dev/de-amp-download/canonical.html