WebKit Bugzilla
Attachment 358209 Details for
Bug 193082
: Remove logic handling DNT header during redirects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193082-20190102145350.patch (text/plain), 6.30 KB, created by
Brent Fulgham
on 2019-01-02 14:53:51 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2019-01-02 14:53:51 PST
Size:
6.30 KB
patch
obsolete
>Subversion Revision: 239578 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 2b64654065768d0b80b01729caa2205e5e232037..affbd38eae12f0aa3857651420e5227f85dfd655 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,35 @@ >+2019-01-02 Brent Fulgham <bfulgham@apple.com> >+ >+ Remove logic handling DNT header during redirects >+ https://bugs.webkit.org/show_bug.cgi?id=193082 >+ <rdar://problem/45555965> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: http/wpt/fetch/dnt-header-after-redirection.html. >+ >+ Don't bother looking for (or passing along) DNT headers during redirects. >+ >+ * NetworkProcess/NetworkLoadChecker.cpp: >+ (WebKit::NetworkLoadChecker::check): >+ (WebKit::NetworkLoadChecker::prepareRedirectedRequest): >+ * NetworkProcess/NetworkLoadChecker.h: >+ >+2019-01-02 Brent Fulgham <bfulgham@apple.com> >+ >+ Remove logic handling DNT header during redirects >+ https://bugs.webkit.org/show_bug.cgi?id=193082 >+ <rdar://problem/45555965> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Don't both looking for (and passing along) DNT headers during redirects. >+ >+ * NetworkProcess/NetworkLoadChecker.cpp: >+ (WebKit::NetworkLoadChecker::check): >+ (WebKit::NetworkLoadChecker::prepareRedirectedRequest): >+ * NetworkProcess/NetworkLoadChecker.h: >+ > 2019-01-02 Brent Fulgham <bfulgham@apple.com> > > Remove unused logging service >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >index dab152e9f3fd25c056fef466330065a666858da5..ba76eeb0eac574e53e6e7e9fc8c6d6899528a7d8 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >@@ -84,19 +84,11 @@ void NetworkLoadChecker::check(ResourceRequest&& request, ContentSecurityPolicyC > m_loadInformation.request = request; > > m_firstRequestHeaders = request.httpHeaderFields(); >- // FIXME: We should not get this information from the request but directly from some NetworkProcess setting. >- m_dntHeaderValue = m_firstRequestHeaders.get(HTTPHeaderName::DNT); >- if (m_dntHeaderValue.isNull() && m_sessionID.isEphemeral()) { >- m_dntHeaderValue = "1"; >- request.setHTTPHeaderField(HTTPHeaderName::DNT, m_dntHeaderValue); >- } > checkRequest(WTFMove(request), client, WTFMove(handler)); > } > > void NetworkLoadChecker::prepareRedirectedRequest(ResourceRequest& request) > { >- if (!m_dntHeaderValue.isNull()) >- request.setHTTPHeaderField(HTTPHeaderName::DNT, m_dntHeaderValue); > } > > static inline NetworkLoadChecker::RedirectionRequestOrError redirectionError(const ResourceResponse& redirectResponse, String&& errorMessage) >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >index 5fcd8d0952297c2974477550d6019842b1459c9e..709f42d2f3c4944c6ece36290979781fc2dcafe0 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >@@ -143,7 +143,6 @@ private: > size_t m_redirectCount { 0 }; > URL m_previousURL; > WebCore::PreflightPolicy m_preflightPolicy; >- String m_dntHeaderValue; > String m_referrer; > bool m_checkContentExtensions { false }; > bool m_shouldCaptureExtraNetworkLoadMetrics { false }; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 1f36ebf8576159f2b56076d5180d5cee62bd592c..c80e9f62f3c0fa04882353837394d29af39bfb80 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-02 Brent Fulgham <bfulgham@apple.com> >+ >+ Remove logic handling DNT header during redirects >+ https://bugs.webkit.org/show_bug.cgi?id=193082 >+ <rdar://problem/45555965> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Revise test case to reflect fact that we no longer include the DNT >+ header in redirects. >+ >+ * http/wpt/fetch/dnt-header-after-redirection-expected.txt: >+ * http/wpt/fetch/dnt-header-after-redirection.html: >+ > 2019-01-02 Simon Fraser <simon.fraser@apple.com> > > Support css-color-4 rgb functions >diff --git a/LayoutTests/http/wpt/fetch/dnt-header-after-redirection-expected.txt b/LayoutTests/http/wpt/fetch/dnt-header-after-redirection-expected.txt >index 1ee6e382b4b5e6bc1ab44284c153cd983e975d52..a8f5be1c0e5d28003115020694aa958ebcf7b945 100644 >--- a/LayoutTests/http/wpt/fetch/dnt-header-after-redirection-expected.txt >+++ b/LayoutTests/http/wpt/fetch/dnt-header-after-redirection-expected.txt >@@ -1,6 +1,6 @@ > > >-PASS video load with DNT >-PASS Sync XHR with DNT >-PASS Beacon with DNT >+PASS video load without DNT >+PASS Sync XHR without DNT >+PASS Beacon without DNT > >diff --git a/LayoutTests/http/wpt/fetch/dnt-header-after-redirection.html b/LayoutTests/http/wpt/fetch/dnt-header-after-redirection.html >index 8bfaf5379b5e161bddecd9a2e5b4f2f96798cad3..b169b5e8c488ea8d345e57ae8d65e2e57a8f3233 100644 >--- a/LayoutTests/http/wpt/fetch/dnt-header-after-redirection.html >+++ b/LayoutTests/http/wpt/fetch/dnt-header-after-redirection.html >@@ -38,8 +38,8 @@ promise_test(async (test) => { > const finalURL = "dnt-status.py?store&token=" + token; > video.src = "resources/redirect.py?location=" + encodeURIComponent(finalURL); > >- assert_true(await checkDNTHeader(test, token), "DNT header is there"); >-}, "video load with DNT"); >+ assert_false(await checkDNTHeader(test, token), "DNT header is not there"); >+}, "video load without DNT"); > > promise_test(async (test) => { > const token = self.token(); >@@ -50,8 +50,8 @@ promise_test(async (test) => { > xhr.send(); > > const response = await fetch("resources/dnt-status.py?read&token=" + token); >- assert_equals(await response.text(), "1", "DNT header"); >-}, "Sync XHR with DNT"); >+ assert_equals(await response.text(), "-1", "DNT header"); >+}, "Sync XHR without DNT"); > > promise_test(async (test) => { > const token = self.token(); >@@ -59,8 +59,8 @@ promise_test(async (test) => { > > navigator.sendBeacon("resources/redirect.py?location=" + encodeURIComponent(finalURL), ""); > >- assert_true(await checkDNTHeader(test, token), "DNT header is there"); >-}, "Beacon with DNT"); >+ assert_false(await checkDNTHeader(test, token), "DNT header is not there"); >+}, "Beacon without DNT"); > </script> > </body> > </html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193082
:
358190
|
358198
|
358199
|
358209
|
358256