RESOLVED FIXED227795
>4K Referer should have tailing /
https://bugs.webkit.org/show_bug.cgi?id=227795
Summary >4K Referer should have tailing /
Sam Sneddon [:gsnedders]
Reported 2021-07-08 08:46:48 PDT
Per referrer policy we reduce long referrers to just the origin; however, this should be serialised as per URL which means that it should have a trailing / This is a relatively big gain on WPT given the large number of referrer policy tests.
Attachments
Patch (3.29 KB, patch)
2021-07-13 11:29 PDT, Alex Christensen
no flags
Chris Dumez
Comment 1 2021-07-08 08:48:37 PDT
Example of failing WPT test(s)?
Sam Sneddon [:gsnedders]
Comment 3 2021-07-08 13:27:48 PDT
Alex Christensen
Comment 4 2021-07-13 11:29:50 PDT
Chris Dumez
Comment 5 2021-07-13 12:02:45 PDT
Comment on attachment 433431 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433431&action=review > Source/WebCore/ChangeLog:9 > + Covered by existing tests and web platform tests we haven't imported yet. It's too bad that we haven't imported those tests yet. > Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:79 > + checkReferer([NSURL URLWithString:longPath], "http://webkit.org/"); It is a bit confusing because this referrer is not > 4K. Also, it seems like this should be easily writable as a layout test?
Alex Christensen
Comment 6 2021-07-13 12:03:45 PDT
Comment on attachment 433431 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433431&action=review >> Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:79 >> + checkReferer([NSURL URLWithString:longPath], "http://webkit.org/"); > > It is a bit confusing because this referrer is not > 4K. > > Also, it seems like this should be easily writable as a layout test? This is the trimmed referrer.
Chris Dumez
Comment 7 2021-07-13 12:06:37 PDT
Comment on attachment 433431 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433431&action=review r=me assuming the bots are happy. >>> Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:79 >>> + checkReferer([NSURL URLWithString:longPath], "http://webkit.org/"); >> >> It is a bit confusing because this referrer is not > 4K. >> >> Also, it seems like this should be easily writable as a layout test? > > This is the trimmed referrer. Oh, I get it now. I would have liked if we had a layout test for this (as we can run in other browsers and other ports of WebKit). But technically, you have test coverage so r+.
Alex Christensen
Comment 8 2021-07-13 12:25:42 PDT
Comment on attachment 433431 [details] Patch The web platform tests have done that for me!
EWS
Comment 9 2021-07-13 12:43:50 PDT
Committed r279886 (239638@main): <https://commits.webkit.org/239638@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433431 [details].
Radar WebKit Bug Importer
Comment 10 2021-07-13 12:44:16 PDT
Note You need to log in before you can comment on or make changes to this bug.