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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 networkRequest.responseHeaders = this._headersMapToHeadersArray(response
.headers); | 172 networkRequest.responseHeaders = this._headersMapToHeadersArray(response
.headers); |
173 if (response.headersText) | 173 if (response.headersText) |
174 networkRequest.responseHeadersText = response.headersText; | 174 networkRequest.responseHeadersText = response.headersText; |
175 if (response.requestHeaders) { | 175 if (response.requestHeaders) { |
176 networkRequest.setRequestHeaders(this._headersMapToHeadersArray(resp
onse.requestHeaders)); | 176 networkRequest.setRequestHeaders(this._headersMapToHeadersArray(resp
onse.requestHeaders)); |
177 networkRequest.setRequestHeadersText(response.requestHeadersText ||
""); | 177 networkRequest.setRequestHeadersText(response.requestHeadersText ||
""); |
178 } | 178 } |
179 | 179 |
180 networkRequest.connectionReused = response.connectionReused; | 180 networkRequest.connectionReused = response.connectionReused; |
181 networkRequest.connectionId = response.connectionId; | 181 networkRequest.connectionId = response.connectionId; |
| 182 if (response.remoteIPAddress) |
| 183 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r
emotePort || -1); |
182 | 184 |
183 if (response.fromDiskCache) | 185 if (response.fromDiskCache) |
184 networkRequest.cached = true; | 186 networkRequest.cached = true; |
185 else | 187 else |
186 networkRequest.timing = response.timing; | 188 networkRequest.timing = response.timing; |
187 | 189 |
188 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { | 190 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { |
189 WebInspector.console.addMessage(WebInspector.ConsoleMessage.create(W
ebInspector.ConsoleMessage.MessageSource.Network, | 191 WebInspector.console.addMessage(WebInspector.ConsoleMessage.create(W
ebInspector.ConsoleMessage.MessageSource.Network, |
190 WebInspector.ConsoleMessage.MessageLevel.Log, | 192 WebInspector.ConsoleMessage.MessageLevel.Log, |
191 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), | 193 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), |
(...skipping 359 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 |