Bug 219939 - Unhandled"421 Misdirected Request" Response
Summary: Unhandled"421 Misdirected Request" Response
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 10.15
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
: 222789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-16 01:53 PST by Joël Gähwiler
Modified: 2022-02-10 14:13 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joël Gähwiler 2020-12-16 01:53:51 PST
Safari 14 on macOS and iOS 14 is not handling the HTTP response code "421 Misdirected Response" for HTTP2 connections. Earlier versions, Safari 13 on macOS or iOS 13 (tested with Browserstack), do not have this issue.

If a HTTP2 connection is reused, but the host does not have the content and responds with a 421, the request will simply fail without being retried. Chrome and Firefox correctly use a fresh HTTP2 connection for that host and reach the correct server. The spec (https://tools.ietf.org/html/rfc7540#section-9.1.1) unfortunately states that this is optional, but I'm sure others depend on this as well.

Apple is actually impacted by this as well as discovered here: https://bugs.webkit.org/show_bug.cgi?id=212606. If you open https://www.icloud.com in a fresh Safari and open the Dev Console a request to https://setup.icloud.com fails due to an unhandled 421, but the page somehow recovers.

In our scenario we use a L4 SNI based proxy that routes traffic to the correct host. The whole domain space (*.cloud.shiftr.io) uses the same wildcard certificated and host address for the proxy. Now if you navigate to https://public.cloud.shiftr.io and then https://garage.cloud.shiftr.io in the *same tab* the second attempt will result in a blank page due to our backend sending a 421 with a blank page.

We will look into being less reliant on this on our end but hope to see that is fixed in Safari soon!

Enjoy the holidays!
Comment 1 Radar WebKit Bug Importer 2020-12-16 17:56:33 PST
<rdar://problem/72407737>
Comment 2 Anne van Kesteren 2021-03-05 23:08:56 PST
*** Bug 222789 has been marked as a duplicate of this bug. ***
Comment 3 Anne van Kesteren 2021-03-05 23:10:32 PST
There's tests for this at https://github.com/web-platform-tests/wpt/pull/27322.
Comment 4 Brent Fulgham 2022-02-10 14:13:05 PST
This is actually:
<rdar://34187588>
Comment 5 Brent Fulgham 2022-02-10 14:13:36 PST
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.

The underlying issue has not been resolved to date.