| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 "text/ecmascript": {"script": true}, | 85 "text/ecmascript": {"script": true}, |
| 86 "application/javascript": {"script": true}, | 86 "application/javascript": {"script": true}, |
| 87 "application/ecmascript": {"script": true}, | 87 "application/ecmascript": {"script": true}, |
| 88 "application/x-javascript": {"script": true}, | 88 "application/x-javascript": {"script": true}, |
| 89 "application/json": {"script": true}, | 89 "application/json": {"script": true}, |
| 90 "text/javascript1.1": {"script": true}, | 90 "text/javascript1.1": {"script": true}, |
| 91 "text/javascript1.2": {"script": true}, | 91 "text/javascript1.2": {"script": true}, |
| 92 "text/javascript1.3": {"script": true}, | 92 "text/javascript1.3": {"script": true}, |
| 93 "text/jscript": {"script": true}, | 93 "text/jscript": {"script": true}, |
| 94 "text/livescript": {"script": true}, | 94 "text/livescript": {"script": true}, |
| 95 "text/vtt": {"texttrack": true}, |
| 95 } | 96 } |
| 96 | 97 |
| 97 WebInspector.NetworkManager.prototype = { | 98 WebInspector.NetworkManager.prototype = { |
| 98 /** | 99 /** |
| 99 * @param {string} url | 100 * @param {string} url |
| 100 * @return {!WebInspector.NetworkRequest} | 101 * @return {!WebInspector.NetworkRequest} |
| 101 */ | 102 */ |
| 102 inflightRequestForURL: function(url) | 103 inflightRequestForURL: function(url) |
| 103 { | 104 { |
| 104 return this._dispatcher._inflightRequestsByURL[url]; | 105 return this._dispatcher._inflightRequestsByURL[url]; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // as it's going to be an error message. We do not want to emit a warnin
g | 211 // as it's going to be an error message. We do not want to emit a warnin
g |
| 211 // for this, though, as this will already be reported as resource loadin
g failure. | 212 // for this, though, as this will already be reported as resource loadin
g failure. |
| 212 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en
produces text/css and gets reloaded, | 213 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en
produces text/css and gets reloaded, |
| 213 // it is 304 Not Modified and its guessed mime-type is text/php, which i
s wrong. | 214 // it is 304 Not Modified and its guessed mime-type is text/php, which i
s wrong. |
| 214 // Don't check for mime-types in 304-resources. | 215 // Don't check for mime-types in 304-resources. |
| 215 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode ===
304 || networkRequest.statusCode === 204) | 216 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode ===
304 || networkRequest.statusCode === 204) |
| 216 return true; | 217 return true; |
| 217 | 218 |
| 218 if (typeof networkRequest.type === "undefined" | 219 if (typeof networkRequest.type === "undefined" |
| 219 || networkRequest.type === WebInspector.resourceTypes.Other | 220 || networkRequest.type === WebInspector.resourceTypes.Other |
| 221 || networkRequest.type === WebInspector.resourceTypes.Media |
| 220 || networkRequest.type === WebInspector.resourceTypes.XHR | 222 || networkRequest.type === WebInspector.resourceTypes.XHR |
| 221 || networkRequest.type === WebInspector.resourceTypes.WebSocket) | 223 || networkRequest.type === WebInspector.resourceTypes.WebSocket) |
| 222 return true; | 224 return true; |
| 223 | 225 |
| 224 if (!networkRequest.mimeType) | 226 if (!networkRequest.mimeType) |
| 225 return true; // Might be not known for cached resources with null re
sponses. | 227 return true; // Might be not known for cached resources with null re
sponses. |
| 226 | 228 |
| 227 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) | 229 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) |
| 228 return networkRequest.type.name() in WebInspector.NetworkManager._MI
METypes[networkRequest.mimeType]; | 230 return networkRequest.type.name() in WebInspector.NetworkManager._MI
METypes[networkRequest.mimeType]; |
| 229 | 231 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc
umentURL, frameId, loaderId); | 553 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc
umentURL, frameId, loaderId); |
| 552 networkRequest.initiator = initiator; | 554 networkRequest.initiator = initiator; |
| 553 return networkRequest; | 555 return networkRequest; |
| 554 } | 556 } |
| 555 } | 557 } |
| 556 | 558 |
| 557 /** | 559 /** |
| 558 * @type {!WebInspector.NetworkManager} | 560 * @type {!WebInspector.NetworkManager} |
| 559 */ | 561 */ |
| 560 WebInspector.networkManager; | 562 WebInspector.networkManager; |
| OLD | NEW |