Skip to content

Commit

Permalink
chore: fix typo (nodejs#2490)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx authored and crysmags committed Feb 27, 2024
1 parent c5a4817 commit a201acd
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion benchmarks/benchmark-https.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ca = readFileSync(path.join(__dirname, '..', 'test', 'fixtures', 'ca.pem')
const servername = 'agent1'

const iterations = (parseInt(process.env.SAMPLES, 10) || 10) + 1
const errorThreshold = parseInt(process.env.ERROR_TRESHOLD, 10) || 3
const errorThreshold = parseInt(process.env.ERROR_THRESHOLD, 10) || 3
const connections = parseInt(process.env.CONNECTIONS, 10) || 50
const pipelining = parseInt(process.env.PIPELINING, 10) || 10
const parallelRequests = parseInt(process.env.PARALLEL, 10) || 100
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { isMainThread } = require('worker_threads')
const { Pool, Client, fetch, Agent, setGlobalDispatcher } = require('..')

const iterations = (parseInt(process.env.SAMPLES, 10) || 10) + 1
const errorThreshold = parseInt(process.env.ERROR_TRESHOLD, 10) || 3
const errorThreshold = parseInt(process.env.ERROR_THRESHOLD, 10) || 3
const connections = parseInt(process.env.CONNECTIONS, 10) || 50
const pipelining = parseInt(process.env.PIPELINING, 10) || 10
const parallelRequests = parseInt(process.env.PARALLEL, 10) || 100
Expand Down
2 changes: 1 addition & 1 deletion docs/api/BalancedPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Arguments:

### `BalancedPool.removeUpstream(upstream)`

Removes an upstream that was previously addded.
Removes an upstream that was previously added.

### `BalancedPool.close([callback])`

Expand Down
8 changes: 4 additions & 4 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class Client extends DispatcherBase {
}

if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {
throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0')
throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0')
}

if (typeof connect !== 'function') {
Expand Down Expand Up @@ -296,7 +296,7 @@ class Client extends DispatcherBase {
? null
: {
// streams: null, // Fixed queue of streams - For future support of `push`
openStreams: 0, // Keep track of them to decide wether or not unref the session
openStreams: 0, // Keep track of them to decide whether or not unref the session
maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server
}
this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}`
Expand Down Expand Up @@ -1706,7 +1706,7 @@ function writeH2 (client, session, request) {
}

// https://tools.ietf.org/html/rfc7540#section-8.3
// :path and :scheme headers must be omited when sending CONNECT
// :path and :scheme headers must be omitted when sending CONNECT

headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_SCHEME] = 'https'
Expand Down Expand Up @@ -1833,7 +1833,7 @@ function writeH2 (client, session, request) {
// })

// stream.on('push', headers => {
// // TODO(HTTP/2): Suppor push
// // TODO(HTTP/2): Support push
// })

// stream.on('trailers', headers => {
Expand Down
2 changes: 1 addition & 1 deletion lib/fetch/dataURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ function serializeAMimeType (mimeType) {
// 4. If value does not solely contain HTTP token code
// points or value is the empty string, then:
if (!HTTP_TOKEN_CODEPOINTS.test(value)) {
// 1. Precede each occurence of U+0022 (") or
// 1. Precede each occurrence of U+0022 (") or
// U+005C (\) in value with U+005C (\).
value = value.replace(/(\\|")/g, '\\$1')

Expand Down
4 changes: 2 additions & 2 deletions lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ function fetching ({
// 5. Let timingInfo be a new fetch timing info whose start time and
// post-redirect start time are the coarsened shared current time given
// crossOriginIsolatedCapability.
const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)
const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)
const timingInfo = createOpaqueTimingInfo({
startTime: currenTime
startTime: currentTime
})

// 6. Let fetchParams be a new fetch params whose
Expand Down
4 changes: 2 additions & 2 deletions lib/handler/RedirectHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class RedirectHandler {
For status 300, which is "Multiple Choices", the spec mentions both generating a Location
response header AND a response body with the other possible location to follow.
Since the spec explicitily chooses not to specify a format for such body and leave it to
Since the spec explicitly chooses not to specify a format for such body and leave it to
servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.
*/
} else {
Expand All @@ -151,7 +151,7 @@ class RedirectHandler {
TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections
and neither are useful if present.
See comment on onData method above for more detailed informations.
See comment on onData method above for more detailed information.
*/

this.location = null
Expand Down
2 changes: 1 addition & 1 deletion test/balanced-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ const cases = [

for (const [index, { config, expected, expectedRatios, iterations = 9, expectedConnectionRefusedErrors = 0, expectedSocketErrors = 0, maxWeightPerServer, errorPenalty = 10, only = false, skip = false }] of cases.entries()) {
test(`weighted round robin - case ${index}`, { only, skip }, async (t) => {
// cerate an array to store succesfull reqeusts
// create an array to store successful requests
const requestLog = []

// create instances of the test servers according to the config
Expand Down
8 changes: 4 additions & 4 deletions test/http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ test('Should support H2 GOAWAY (server-side)', async t => {
t.equal(err.message, 'HTTP/2: "GOAWAY" frame received with code 204')
})

test('Should throw if bad allowH2 has been pased', async t => {
test('Should throw if bad allowH2 has been passed', async t => {
try {
// eslint-disable-next-line
new Client('https://localhost:1000', {
Expand All @@ -294,7 +294,7 @@ test('Should throw if bad allowH2 has been pased', async t => {
}
})

test('Should throw if bad maxConcurrentStreams has been pased', async t => {
test('Should throw if bad maxConcurrentStreams has been passed', async t => {
try {
// eslint-disable-next-line
new Client('https://localhost:1000', {
Expand All @@ -305,7 +305,7 @@ test('Should throw if bad maxConcurrentStreams has been pased', async t => {
} catch (error) {
t.equal(
error.message,
'maxConcurrentStreams must be a possitive integer, greater than 0'
'maxConcurrentStreams must be a positive integer, greater than 0'
)
}

Expand All @@ -319,7 +319,7 @@ test('Should throw if bad maxConcurrentStreams has been pased', async t => {
} catch (error) {
t.equal(
error.message,
'maxConcurrentStreams must be a possitive integer, greater than 0'
'maxConcurrentStreams must be a positive integer, greater than 0'
)
}
})
Expand Down
2 changes: 1 addition & 1 deletion test/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const {
errors
} = require('..')

test('throws when connection is inifinite', (t) => {
test('throws when connection is infinite', (t) => {
t.plan(2)

try {
Expand Down

0 comments on commit a201acd

Please sign in to comment.