[webkit-changes] [WebKit/WebKit] 7c18c3: Adds Quirk so that booking.com sends simple JPEG t...

Karl Dubost noreply at github.com
Thu Feb 22 20:14:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7c18c3da4148c58fdb27ede24514d32ab6bd3ab6
      https://github.com/WebKit/WebKit/commit/7c18c3da4148c58fdb27ede24514d32ab6bd3ab6
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp
    M Source/WebCore/loader/cache/CachedResourceRequest.cpp
    M Source/WebCore/loader/cache/CachedResourceRequest.h
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Adds Quirk so that booking.com sends simple JPEG to WebKit on iOS
https://bugs.webkit.org/show_bug.cgi?id=269875
rdar://123408770

Reviewed by Chris Dumez.

In webkit.org/b/178758, the support for JPEG2000 was removed from
WebKit. Booking.com is doing content negociation on both the
User-Agent string and the HTTP accept header. The website sends
JPEG2000 assets to Safari on iOS. An outreach effort has been started
to make sure that booking fixes their servers.
See https://github.com/webcompat/web-bugs/issues/133697

No other breakage has been detected yet, but we know that Cloudinary
is currently JPEG2000 images for some websites on both iOS and macOS.
It might break once this release of WebKit reaches Safari. An ongoing
effort has started to avoid this so that Cloudinary can adjust their
rules and warn their customers.

In the meantime this Quirk sends a different HTTP Accept header for
booking.com tricking the server into sending compatible image resources
for HTML requests instead of JPEG2000.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::updateRequestAndAddExtraFields):
* Source/WebCore/loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::acceptHeaderValueFromType):
(WebCore::CachedResourceRequest::setAcceptHeaderIfNone):
* Source/WebCore/loader/cache/CachedResourceRequest.h:
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldSendLongerAcceptHeaderQuirk):
* Source/WebCore/page/Quirks.h:

Canonical link: https://commits.webkit.org/275216@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list