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

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: 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 | « no previous file | 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 if ('Set-Cookie' in response.headers) {
376 if (response.headers['Set-Cookie'].length > 4096) {
allada 2016/12/09 18:26:50 Can we also put a comment in here to where/what th
allada 2016/12/09 18:26:50 Lets put both if statements on same line.
kozy 2016/12/10 02:44:17 Done.
kozy 2016/12/10 02:44:17 Done.
377 Common.console.warn(Common.UIString(
378 'Set-Cookie header is ignored for response from url: %s. Cookie leng th should be less then or equal to 4096 symbols.',
379 response.url));
380 }
381 }
382
375 this._updateNetworkRequestWithResponse(networkRequest, response); 383 this._updateNetworkRequestWithResponse(networkRequest, response);
376 384
377 this._updateNetworkRequest(networkRequest); 385 this._updateNetworkRequest(networkRequest);
378 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec eived, networkRequest); 386 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec eived, networkRequest);
379 } 387 }
380 388
381 /** 389 /**
382 * @override 390 * @override
383 * @param {!Protocol.Network.RequestId} requestId 391 * @param {!Protocol.Network.RequestId} requestId
384 * @param {!Protocol.Network.Timestamp} time 392 * @param {!Protocol.Network.Timestamp} time
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 SDK.MultitargetNetworkManager.Events = { 895 SDK.MultitargetNetworkManager.Events = {
888 ConditionsChanged: Symbol('ConditionsChanged'), 896 ConditionsChanged: Symbol('ConditionsChanged'),
889 UserAgentChanged: Symbol('UserAgentChanged') 897 UserAgentChanged: Symbol('UserAgentChanged')
890 }; 898 };
891 899
892 900
893 /** 901 /**
894 * @type {!SDK.MultitargetNetworkManager} 902 * @type {!SDK.MultitargetNetworkManager}
895 */ 903 */
896 SDK.multitargetNetworkManager; 904 SDK.multitargetNetworkManager;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698