Title: [279886] trunk
- Revision
- 279886
- Author
- [email protected]
- Date
- 2021-07-13 12:43:42 -0700 (Tue, 13 Jul 2021)
Log Message
>4K Referer should have tailing /
https://bugs.webkit.org/show_bug.cgi?id=227795
Patch by Alex Christensen <[email protected]> on 2021-07-13
Reviewed by Chris Dumez.
Source/WebCore:
This matches the behavior of other browsers.
Covered by existing tests and web platform tests we haven't imported yet.
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setHTTPReferrer):
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (279885 => 279886)
--- trunk/Source/WebCore/ChangeLog 2021-07-13 19:38:32 UTC (rev 279885)
+++ trunk/Source/WebCore/ChangeLog 2021-07-13 19:43:42 UTC (rev 279886)
@@ -1,3 +1,16 @@
+2021-07-13 Alex Christensen <[email protected]>
+
+ >4K Referer should have tailing /
+ https://bugs.webkit.org/show_bug.cgi?id=227795
+
+ Reviewed by Chris Dumez.
+
+ This matches the behavior of other browsers.
+ Covered by existing tests and web platform tests we haven't imported yet.
+
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::setHTTPReferrer):
+
2021-07-13 Said Abou-Hallawa <[email protected]>
[CG] REGRESSION(r278863): The destination rectangle is truncated when the sub-image is used
Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (279885 => 279886)
--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp 2021-07-13 19:38:32 UTC (rev 279885)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp 2021-07-13 19:43:42 UTC (rev 279886)
@@ -394,7 +394,7 @@
constexpr size_t maxLength = 4096;
if (httpReferrer.length() > maxLength) {
RELEASE_LOG(Loading, "Truncating HTTP referer");
- String origin = SecurityOrigin::create(URL(URL(), httpReferrer))->toString();
+ String origin = URL(URL(), SecurityOrigin::create(URL(URL(), httpReferrer))->toString()).string();
if (origin.length() <= maxLength)
setHTTPHeaderField(HTTPHeaderName::Referer, origin);
} else
Modified: trunk/Tools/ChangeLog (279885 => 279886)
--- trunk/Tools/ChangeLog 2021-07-13 19:38:32 UTC (rev 279885)
+++ trunk/Tools/ChangeLog 2021-07-13 19:43:42 UTC (rev 279886)
@@ -1,3 +1,13 @@
+2021-07-13 Alex Christensen <[email protected]>
+
+ >4K Referer should have tailing /
+ https://bugs.webkit.org/show_bug.cgi?id=227795
+
+ Reviewed by Chris Dumez.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
+ (TEST):
+
2021-07-13 Said Abou-Hallawa <[email protected]>
[CG] REGRESSION(r278863): The destination rectangle is truncated when the sub-image is used
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm (279885 => 279886)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm 2021-07-13 19:38:32 UTC (rev 279885)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm 2021-07-13 19:43:42 UTC (rev 279886)
@@ -76,7 +76,7 @@
NSString *shorterPath = [NSString stringWithFormat:@"http://webkit.org/%s?asdf", a3k.data()];
NSString *longHost = [NSString stringWithFormat:@"http://webkit.org%s/path", a5k.data()];
NSString *shorterHost = [NSString stringWithFormat:@"http://webkit.org%s/path", a3k.data()];
- checkReferer([NSURL URLWithString:longPath], "http://webkit.org");
+ checkReferer([NSURL URLWithString:longPath], "http://webkit.org/");
checkReferer([NSURL URLWithString:shorterPath], shorterPath.UTF8String);
checkReferer([NSURL URLWithString:longHost], nullptr);
checkReferer([NSURL URLWithString:shorterHost], shorterHost.UTF8String);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes