Closed Bug 1689018 Opened 5 years ago Closed 5 years ago

<a download> is not respected when there is a redirection

Categories

(Core :: Networking, defect, P2)

Firefox 87
defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: jc, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.50

Steps to reproduce:

There is a <a download> that links to /api/foo/data.

/api/foo/data 302 redirects to /api/foo/data?token=bar, which returns Content-Disposition: inline.

Actual results:

Firefox tries to open the content inline.

Expected results:

This is inconsistent with the generally accepted behavior that client preference (download attribute of <a>) should be prioritized. See 1658877.

Safari and Chromium respects download and tries to download the content.

Do you have a live testcase that could be used for this bug?

Flags: needinfo?(jc)
Component: Untriaged → Networking
Product: Firefox → Core
Depends on: 1658877

(In reply to :Gijs (he/him) from comment #1)

Do you have a live testcase that could be used for this bug?

https://firefox-1689018.vercel.app/

Flags: needinfo?(jc) → needinfo?(jstutte)

(In reply to Jesse Chan from comment #2)

(In reply to :Gijs (he/him) from comment #1)

Do you have a live testcase that could be used for this bug?

https://firefox-1689018.vercel.app/

Thanks. I'll take a look at this.

Flags: needinfo?(jstutte) → needinfo?(kershaw)
Assignee: nobody → kershaw
Flags: needinfo?(kershaw)
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b60244d810e Convey content disposition information to new redirect channel r=necko-reviewers,Gijs,valentin
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: