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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 eventData.mimeType = response.mimeType; 365 eventData.mimeType = response.mimeType;
366 var lastModifiedHeader = response.headers['last-modified']; 366 var lastModifiedHeader = response.headers['last-modified'];
367 eventData.lastModified = lastModifiedHeader ? new Date(lastModifiedHeader) : null; 367 eventData.lastModified = lastModifiedHeader ? new Date(lastModifiedHeader) : null;
368 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestUp dateDropped, eventData); 368 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestUp dateDropped, eventData);
369 return; 369 return;
370 } 370 }
371 371
372 networkRequest.responseReceivedTime = time; 372 networkRequest.responseReceivedTime = time;
373 networkRequest.setResourceType(Common.resourceTypes[resourceType]); 373 networkRequest.setResourceType(Common.resourceTypes[resourceType]);
374 374
375 // net::ParsedCookie::kMaxCookieSize = 4096 (net/cookies/parsed_cookie.h)
376 if ('Set-Cookie' in response.headers && response.headers['Set-Cookie'].lengt h > 4096) {
377 Common.console.warn(Common.UIString(
378 'Set-Cookie header is ignored in response from url: %s. Cookie length should be less then or equal to 4096 characters.',
379 response.url));
380 }
381
375 this._updateNetworkRequestWithResponse(networkRequest, response); 382 this._updateNetworkRequestWithResponse(networkRequest, response);
376 383
377 this._updateNetworkRequest(networkRequest); 384 this._updateNetworkRequest(networkRequest);
378 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec eived, networkRequest); 385 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec eived, networkRequest);
379 } 386 }
380 387
381 /** 388 /**
382 * @override 389 * @override
383 * @param {!Protocol.Network.RequestId} requestId 390 * @param {!Protocol.Network.RequestId} requestId
384 * @param {!Protocol.Network.Timestamp} time 391 * @param {!Protocol.Network.Timestamp} time
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 SDK.MultitargetNetworkManager.Events = { 894 SDK.MultitargetNetworkManager.Events = {
888 ConditionsChanged: Symbol('ConditionsChanged'), 895 ConditionsChanged: Symbol('ConditionsChanged'),
889 UserAgentChanged: Symbol('UserAgentChanged') 896 UserAgentChanged: Symbol('UserAgentChanged')
890 }; 897 };
891 898
892 899
893 /** 900 /**
894 * @type {!SDK.MultitargetNetworkManager} 901 * @type {!SDK.MultitargetNetworkManager}
895 */ 902 */
896 SDK.multitargetNetworkManager; 903 SDK.multitargetNetworkManager;
OLDNEW
« 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