Closed Bug 1917177 Opened 11 months ago Closed 11 months ago

Remove image mime types from documment accept header

Categories

(Core :: Networking, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
132 Branch
Tracking Status
firefox-esr128 --- verified
firefox132 --- verified

People

(Reporter: valentin, Assigned: valentin)

References

(Regressed 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [necko-triaged])

Attachments

(2 files)

The document accept header currently includes image mime types. However, that causes web-compat issues sometimes.
We should align with the Fetch standard and safari instead.

This aligns us with the fetch spec and Safari.

This patch also adds a pref to control whether supported image formats are also
part of the document accept header - defaults to false.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b42596845ea0 Remove image mime types from documment accept header r=necko-reviewers,kershaw
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch

This change has web compatibility implications (for example, websites using the WoltLab Suite no longer provide WebP images for Firefox users, as the software depends on the accept header for the main request; I already reported the issue to the developers). Can you please add a note to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/132? Thanks!

Release Note Request (optional, but appreciated)
[Why is this notable]: see comment 4
[Affects Firefox for Android]:
[Suggested wording]:
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Duplicate of this bug: 1939157

This has baked a couple cycles on Release now with no known regressions. What are your thoughts on uplifting this to ESR128 to address bug 1914363 there too? It grafts cleanly.

Flags: needinfo?(valentin.gosu)

This aligns us with the fetch spec and Safari.

This patch also adds a pref to control whether supported image formats are also
part of the document accept header - defaults to false.

Original Revision: https://phabricator.services.mozilla.com/D221110

Attachment #9461396 - Flags: approval-mozilla-esr128?

esr128 Uplift Approval Request

  • User impact if declined: Firefox will send an incorrect Accept header, which might cause servers to return the wrong content type.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: See bug 1914363 comment 0
  • Risk associated with taking this patch: Low
  • Explanation of risk level: This patch has baked on Nightly and release for a few months.
  • String changes made/needed: none
  • Is Android affected?: yes
Flags: qe-verify+
Flags: needinfo?(valentin.gosu)
Attachment #9461396 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
No longer duplicate of this bug: 1939157
Regressions: 1939157

FYI MDN 132 docs completed in https://github.com/mdn/content/pull/37836 (update to docs) and https://github.com/mdn/content/pull/37838 (release note).

I can reproduce this issue in Nightly v132.0a1 from 2024-07-05 in Windows 10 and Ubuntu 22, but not in MacOS 11. I can verify this fix in Nightly v132.0a1 from 2024-09-07 and ESR v128.7.0esr in Windows 10, Ubuntu 22 and MacOS 11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
OS: Unspecified → All
Hardware: Unspecified → Desktop
Regressions: 1950012
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: