Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1071)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Issue 2563083002: [DevTools] show warning if 'Set-Cookie' header length is > 4096 symbols (Closed)
Patch Set: addressed all comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-long-cookie-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
index d16da3703b25ac6a5953e0b0e9c5ee4f0019d1f2..85c918d6cc4af6bb591672975afc17eeea12aee6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
@@ -372,6 +372,13 @@ SDK.NetworkDispatcher = class {
networkRequest.responseReceivedTime = time;
networkRequest.setResourceType(Common.resourceTypes[resourceType]);
+ // net::ParsedCookie::kMaxCookieSize = 4096 (net/cookies/parsed_cookie.h)
+ if ('Set-Cookie' in response.headers && response.headers['Set-Cookie'].length > 4096) {
+ Common.console.warn(Common.UIString(
+ 'Set-Cookie header is ignored in response from url: %s. Cookie length should be less then or equal to 4096 characters.',
+ response.url));
+ }
+
this._updateNetworkRequestWithResponse(networkRequest, response);
this._updateNetworkRequest(networkRequest);
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-long-cookie-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698