Changeset 243087 in webkit
- Timestamp:
- Mar 18, 2019, 11:47:43 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243084 r243087 1 2019-03-18 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HAR Extension for `serverIPAddress` port number 4 https://bugs.webkit.org/show_bug.cgi?id=195695 5 6 Reviewed by Matt Baker. 7 8 * http/tests/inspector/network/har/har-basic-expected.txt: 9 * http/tests/inspector/network/har/har-page-expected.txt: 10 1 11 2019-03-18 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/LayoutTests/http/tests/inspector/network/har/har-basic-expected.txt
r243031 r243087 136 136 }, 137 137 "serverIPAddress": "12.34.56.78", 138 "_serverPort": 443, 138 139 "connection": "1", 139 140 "_fetchType": "Network Load", -
trunk/LayoutTests/http/tests/inspector/network/har/har-page-expected.txt
r243031 r243087 63 63 "receive": "<filtered>" 64 64 }, 65 "_serverPort": 8000, 65 66 "_priority": "high" 66 67 }, … … 105 106 "receive": "<filtered>" 106 107 }, 108 "_serverPort": 8000, 107 109 "_priority": "high" 108 110 }, … … 147 149 "receive": "<filtered>" 148 150 }, 151 "_serverPort": 8000, 149 152 "_priority": "high" 150 153 }, … … 196 199 "receive": "<filtered>" 197 200 }, 201 "_serverPort": 8000, 198 202 "_priority": "medium" 199 203 }, … … 251 255 "receive": "<filtered>" 252 256 }, 257 "_serverPort": 8000, 253 258 "_priority": "medium" 254 259 }, … … 305 310 "receive": "<filtered>" 306 311 }, 312 "_serverPort": 8000, 307 313 "_priority": "medium" 308 314 }, … … 359 365 "receive": "<filtered>" 360 366 }, 367 "_serverPort": 8000, 361 368 "_priority": "medium" 362 369 }, … … 413 420 "receive": "<filtered>" 414 421 }, 422 "_serverPort": 8000, 415 423 "_priority": "medium" 416 424 }, … … 471 479 "receive": "<filtered>" 472 480 }, 481 "_serverPort": 8000, 473 482 "_priority": "medium" 474 483 }, … … 535 544 "receive": "<filtered>" 536 545 }, 546 "_serverPort": 8000, 537 547 "_priority": "medium" 538 548 }, … … 603 613 "receive": "<filtered>" 604 614 }, 615 "_serverPort": 8000, 605 616 "_priority": "medium" 606 617 }, … … 675 686 "receive": "<filtered>" 676 687 }, 688 "_serverPort": 8000, 677 689 "_priority": "medium" 678 690 }, … … 751 763 "receive": "<filtered>" 752 764 }, 765 "_serverPort": 8000, 753 766 "_priority": "medium" 754 767 } -
trunk/Source/WebInspectorUI/ChangeLog
r243038 r243087 1 2019-03-18 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HAR Extension for `serverIPAddress` port number 4 https://bugs.webkit.org/show_bug.cgi?id=195695 5 6 Reviewed by Matt Baker. 7 8 * UserInterface/Controllers/HARBuilder.js: 9 (WI.HARBuilder.entry): 10 (WI.HARBuilder.port): 11 * UserInterface/Models/LocalResource.js: 12 (WI.LocalResource.fromHAREntry): 13 1 14 2019-03-16 Nikita Vasilyev <nvasilyev@apple.com> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js
r243031 r243087 106 106 if (resource.remoteAddress) { 107 107 entry.serverIPAddress = HARBuilder.ipAddress(resource.remoteAddress); 108 // FIXME: <https://webkit.org/b/195695> Web Inspector: HAR Extension for `serverIPAddress` port number 108 109 // WebKit Custom Field `_serverPort`. 110 if (entry.serverIPAddress) 111 entry._serverPort = HARBuilder.port(resource.remoteAddress); 109 112 } 110 113 if (resource.connectionIdentifier) … … 294 297 // So this always strips the last part. 295 298 return remoteAddress.replace(/:\d+$/, ""); 299 } 300 301 static port(remoteAddress) 302 { 303 // IP Address, without port. 304 if (!remoteAddress) 305 return undefined; 306 307 // NOTE: Resource.remoteAddress always includes the port at the end. 308 // So this always matches the last part. 309 let index = remoteAddress.lastIndexOf(":"); 310 if (!index) 311 return undefined; 312 313 let portString = remoteAddress.substr(index + 1); 314 let port = parseInt(portString); 315 if (isNaN(port)) 316 return undefined; 317 318 return port; 296 319 } 297 320 -
trunk/Source/WebInspectorUI/UserInterface/Models/LocalResource.js
r243031 r243087 98 98 static fromHAREntry(entry, archiveStartWalltime) 99 99 { 100 // FIXME: <https://webkit.org/b/195695> Web Inspector: HAR Extension for `serverIPAddress` port number101 100 // FIXME: <https://webkit.org/b/195694> Web Inspector: HAR Extension for Redirect Timing Info 102 101 … … 159 158 finishedTimestamp = timing.responseEnd; 160 159 } 160 161 let serverAddress = entry.serverIPAddress || null; 162 if (serverAddress && typeof entry._serverPort === "number") 163 serverAddress += ":" + entry._serverPort; 161 164 162 165 return new WI.LocalResource({ … … 183 186 protocol: WI.HARBuilder.protocolFromHARProtocol(response.httpVersion), 184 187 priority: WI.HARBuilder.networkPriorityFromHARPriority(entry._priority), 185 remoteAddress: entry.serverIPAddress || null,188 remoteAddress: serverAddress, 186 189 connectionIdentifier: entry.connection ? parseInt(entry.connection) : null, 187 190 requestHeaderBytesSent: request.headersSize >= 0 ? request.headersSize : NaN,
Note:
See TracChangeset
for help on using the changeset viewer.