Skip to content

Commit 6177039

Browse files
authored
lib: deprecate _http_*
1 parent 14e16db commit 6177039

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5330
-4988
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
/lib/https.js @nodejs/crypto @nodejs/net @nodejs/http
7474
/src/node_http_common* @nodejs/http @nodejs/http2 @nodejs/net
7575
/src/node_http_parser.cc @nodejs/http @nodejs/net
76+
/lib/internal/http/* @nodejs/http @nodejs/net
7677

7778
# http2
7879

benchmark/http/check_invalid_header_char.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common.js');
4-
const _checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar;
54

65
const groupedInputs = {
76
// Representative set of inputs from an AcmeAir benchmark run:
@@ -51,9 +50,13 @@ const inputs = [
5150
const bench = common.createBenchmark(main, {
5251
input: inputs.concat(Object.keys(groupedInputs)),
5352
n: [1e6],
53+
}, {
54+
flags: ['--expose-internals', '--no-warnings'],
5455
});
5556

5657
function main({ n, input }) {
58+
const checkInvalidHeaderChar = require('internal/http/common')._checkInvalidHeaderChar;
59+
5760
let inputs = [input];
5861
if (Object.hasOwn(groupedInputs, input)) {
5962
inputs = groupedInputs[input];
@@ -62,7 +65,7 @@ function main({ n, input }) {
6265
const len = inputs.length;
6366
bench.start();
6467
for (let i = 0; i < n; i++) {
65-
_checkInvalidHeaderChar(inputs[i % len]);
68+
checkInvalidHeaderChar(inputs[i % len]);
6669
}
6770
bench.end(n);
6871
}

benchmark/http/check_is_http_token.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common.js');
4-
const _checkIsHttpToken = require('_http_common')._checkIsHttpToken;
54

65
const bench = common.createBenchmark(main, {
76
key: [
@@ -38,12 +37,16 @@ const bench = common.createBenchmark(main, {
3837
'alternate-protocol:', // slow bailout
3938
],
4039
n: [1e6],
40+
}, {
41+
flags: ['--expose-internals', '--no-warnings'],
4142
});
4243

4344
function main({ n, key }) {
45+
const checkIsHttpToken = require('internal/http/common')._checkIsHttpToken;
46+
4447
bench.start();
4548
for (let i = 0; i < n; i++) {
46-
_checkIsHttpToken(key);
49+
checkIsHttpToken(key);
4750
}
4851
bench.end(n);
4952
}

benchmark/http/set_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const common = require('../common.js');
4-
const { OutgoingMessage } = require('_http_outgoing');
4+
const { OutgoingMessage } = require('http');
55

66
const bench = common.createBenchmark(main, {
77
value: [

doc/api/deprecations.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4368,6 +4368,9 @@ Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLeng
43684368

43694369
<!-- YAML
43704370
changes:
4371+
- version: REPLACEME
4372+
pr-url: https://github.com/nodejs/node/pull/58535
4373+
description: Runtime deprecation.
43714374
- version:
43724375
- v24.6.0
43734376
- v22.19.0

0 commit comments

Comments
 (0)