Skip to content

Commit

Permalink
fix: typo clampAndCoarsenConnectionTimingInfo (nodejs#2653)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored and crysmags committed Feb 27, 2024
1 parent 6c7ae16 commit 7c1e991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const {
urlIsLocal,
urlIsHttpHttpsScheme,
urlHasHttpsScheme,
clampAndCoursenConnectionTimingInfo,
clampAndCoarsenConnectionTimingInfo,
simpleRangeHeaderValue,
buildContentRange,
createInflate
Expand Down Expand Up @@ -2095,7 +2095,7 @@ async function httpNetworkFetch (
// connection timing info with connection’s timing info, timingInfo’s post-redirect start
// time, and fetchParams’s cross-origin isolated capability.
// TODO: implement connection timing
timingInfo.finalConnectionTimingInfo = clampAndCoursenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability)
timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability)

if (connection.destroyed) {
abort(new DOMException('The operation was aborted.', 'AbortError'))
Expand Down
4 changes: 2 additions & 2 deletions lib/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function coarsenTime (timestamp, crossOriginIsolatedCapability) {
}

// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info
function clampAndCoursenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {
function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {
if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {
return {
domainLookupStartTime: defaultStartTime,
Expand Down Expand Up @@ -1220,7 +1220,7 @@ module.exports = {
ReadableStreamFrom,
toUSVString,
tryUpgradeRequestToAPotentiallyTrustworthyURL,
clampAndCoursenConnectionTimingInfo,
clampAndCoarsenConnectionTimingInfo,
coarsenedSharedCurrentTime,
determineRequestsReferrer,
makePolicyContainer,
Expand Down

0 comments on commit 7c1e991

Please sign in to comment.