WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
262030
Link-stylesheet elements fire load events for non-2XX responses (e.g., 3XX responses that do not redirect)
https://bugs.webkit.org/show_bug.cgi?id=262030
Summary
Link-stylesheet elements fire load events for non-2XX responses (e.g., 3XX re...
jannis.rautenstrauch
Reported
2023-09-25 00:20:29 PDT
Link-stylesheet elements fire load events for 3XX responses that do not redirect (e.g., no location header). - 300, text/css, image body:
https://observer.sectec.rocks/opg/link-stylesheet/?url=https://echo.sectec.rocks/echo/?content-type=text/css&ecohd_status=300&ecocnt_img=width=200,height=300,type=png
- 302, text/css, css body:
https://observer.sectec.rocks/opg/link-stylesheet/?url=https://echo.sectec.rocks/echo/?content-type=text/css&ecohd_status=302&ecocnt_css=p%20{color:%20red
;} - 307, text/html, empty:
https://observer.sectec.rocks/opg/link-stylesheet/?url=https://echo.sectec.rocks/echo/?content-type=text/html&echd_status=307
Refer:
https://bugs.webkit.org/show_bug.cgi?id=261811
Attachments
Add attachment
proposed patch, testcase, etc.
sideshowbarker
Comment 1
2023-09-26 11:05:20 PDT
I suspect the same behavior would be observed in WebKit for any other type of subresource request; that is, the behavior isn’t special or specific to <link rel=stylesheet> elements — instead, the load event will also fire for any other type of subresource request with a 3XX response that doesn’t redirect. And in that case,
https://fetch.spec.whatwg.org/
would be the place where the relevant requirements are given. At least there’s nothing in the HTML spec that states any requirements about what UAs must do in the case where the response for a <link rel=stylesheet> request is a 3XX response that doesn’t redirect. (In contrast to the
https://bugs.webkit.org/show_bug.cgi?id=261811
case, where the spec does explicitly state requirements for what UAs must do when the MIME type isn’t text/css.)
sideshowbarker
Comment 2
2023-09-29 04:02:26 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/18404
Radar WebKit Bug Importer
Comment 3
2023-10-02 00:21:13 PDT
<
rdar://problem/116331826
>
sideshowbarker
Comment 4
2023-10-02 10:16:15 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/42288
EWS
Comment 5
2023-10-03 08:19:03 PDT
Committed
268779@main
(d84fa2dfd249): <
https://commits.webkit.org/268779@main
> Reviewed commits have been landed. Closing PR #18404 and removing active labels.
Thomas Wisniewski [:twisniewski]
Comment 6
2024-03-06 10:27:26 PST
It looks like the WPT pull request was never merged. Could you please check if it's still good to merge and do so? It would be nice to have this test up on wpt.live and wpt.fyi.
Karl Dubost
Comment 7
2024-03-06 16:59:42 PST
hmm, thanks again Thomas.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug