chrome-har
Advanced tools
Comparing version 0.13.3 to 0.13.5
# CHANGELOG | ||
## 0.13.2 - 2024-07-05 | ||
## 0.13.5 - 2024-07-12 | ||
### Fixed | ||
* Always take care of Network.responseReceivedExtraInfo even if its fired early, thank you [ifduyue](https://github.com/ifduyue) for PR [#120](https://github.com/sitespeedio/chrome-har/pull/120). | ||
(0.13.4 was never released) | ||
## 0.13.3 - 2024-07-05 | ||
### Fixed | ||
* Include early hints requests, thank you [Ben Schwarz](https://github.com/benschwarz) for PR [#118](https://github.com/sitespeedio/chrome-har/pull/118). | ||
@@ -6,0 +12,0 @@ |
25
index.js
@@ -70,2 +70,3 @@ 'use strict'; | ||
paramsWithoutPage = [], | ||
responseReceivedExtraInfos = [], | ||
currentPageId; | ||
@@ -340,7 +341,3 @@ | ||
if (!entry) { | ||
debug( | ||
`Received response extra info for requestId ${ | ||
params.requestId | ||
} with no matching request.` | ||
); | ||
responseReceivedExtraInfos.push(params); | ||
continue; | ||
@@ -355,2 +352,3 @@ } | ||
}; | ||
responseReceivedExtraInfos.push(params); | ||
continue; | ||
@@ -360,5 +358,3 @@ } | ||
if (params.headers) { | ||
entry.response.headers = entry.response.headers.concat( | ||
parseHeaders(params.headers) | ||
); | ||
entry.response.headers = parseHeaders(params.headers); | ||
} | ||
@@ -425,2 +421,15 @@ } | ||
} | ||
const responseReceivedExtraInfo = responseReceivedExtraInfos.find( | ||
responseReceivedExtraInfo => | ||
responseReceivedExtraInfo.requestId == params.requestId | ||
); | ||
if ( | ||
responseReceivedExtraInfo && | ||
responseReceivedExtraInfo.headers | ||
) { | ||
entry.response.headers = parseHeaders( | ||
responseReceivedExtraInfo.headers | ||
); | ||
} | ||
} | ||
@@ -427,0 +436,0 @@ break; |
{ | ||
"name": "chrome-har", | ||
"version": "0.13.3", | ||
"version": "0.13.5", | ||
"description": "Create HAR files from Chrome Debugging Protocol data.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
47050
1025