OLD | NEW |
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 networkRequest.responseReceivedTime = time; | 375 networkRequest.responseReceivedTime = time; |
376 networkRequest.setResourceType(Common.resourceTypes[resourceType]); | 376 networkRequest.setResourceType(Common.resourceTypes[resourceType]); |
377 | 377 |
378 // net::ParsedCookie::kMaxCookieSize = 4096 (net/cookies/parsed_cookie.h) | 378 // net::ParsedCookie::kMaxCookieSize = 4096 (net/cookies/parsed_cookie.h) |
379 if ('Set-Cookie' in response.headers && response.headers['Set-Cookie'].lengt
h > 4096) { | 379 if ('Set-Cookie' in response.headers && response.headers['Set-Cookie'].lengt
h > 4096) { |
380 Common.console.warn(Common.UIString( | 380 Common.console.warn(Common.UIString( |
381 'Set-Cookie header is ignored in response from url: %s. Cookie length
should be less then or equal to 4096 characters.', | 381 'Set-Cookie header is ignored in response from url: %s. Cookie length
should be less then or equal to 4096 characters.', |
382 response.url)); | 382 response.url)); |
383 } | 383 } |
384 | 384 |
| 385 // Cookies with the Secure attribute set will be ignored if coming from an |
| 386 // insecure connection. See net::CanonicalCookie::Create in |
| 387 // net/cookies/canonical_cookie.cc. Note that this console message is meant |
| 388 // to be temporary, and should be removed after 08/01/2017. |
| 389 if (response.url.asParsedURL().scheme !== 'https' && |
| 390 'Set-Cookie' in response.headers) { |
| 391 var cookies = SDK.CookieParser.parseSetCookie(this._manager._target, respo
nse.headers['Set-Cookie']); |
| 392 for (var i = 0; i < cookies.length; i++) { |
| 393 if (cookies[i].secure()) { |
| 394 Common.console.warn(Common.UIString( |
| 395 'Set-Cookie for %s is ignored in response from url: %s. It is mark
ed as secure, but the response url is insecure.', |
| 396 cookies[i].name(), response.url)); |
| 397 } |
| 398 } |
| 399 } |
| 400 |
385 this._updateNetworkRequestWithResponse(networkRequest, response); | 401 this._updateNetworkRequestWithResponse(networkRequest, response); |
386 | 402 |
387 this._updateNetworkRequest(networkRequest); | 403 this._updateNetworkRequest(networkRequest); |
388 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec
eived, networkRequest); | 404 this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.ResponseRec
eived, networkRequest); |
389 } | 405 } |
390 | 406 |
391 /** | 407 /** |
392 * @override | 408 * @override |
393 * @param {!Protocol.Network.RequestId} requestId | 409 * @param {!Protocol.Network.RequestId} requestId |
394 * @param {!Protocol.Network.Timestamp} time | 410 * @param {!Protocol.Network.Timestamp} time |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 SDK.MultitargetNetworkManager.Events = { | 913 SDK.MultitargetNetworkManager.Events = { |
898 ConditionsChanged: Symbol('ConditionsChanged'), | 914 ConditionsChanged: Symbol('ConditionsChanged'), |
899 UserAgentChanged: Symbol('UserAgentChanged') | 915 UserAgentChanged: Symbol('UserAgentChanged') |
900 }; | 916 }; |
901 | 917 |
902 | 918 |
903 /** | 919 /** |
904 * @type {!SDK.MultitargetNetworkManager} | 920 * @type {!SDK.MultitargetNetworkManager} |
905 */ | 921 */ |
906 SDK.multitargetNetworkManager; | 922 SDK.multitargetNetworkManager; |
OLD | NEW |