Skip to content

Commit 731360d

Browse files
authored
lib: deprecate _http_*
1 parent f6464c5 commit 731360d

Some content is hidden

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

49 files changed

+5266
-4919
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
/lib/https.js @nodejs/crypto @nodejs/net @nodejs/http
7676
/src/node_http_common* @nodejs/http @nodejs/http2 @nodejs/net
7777
/src/node_http_parser.cc @nodejs/http @nodejs/net
78+
/lib/internal/http/* @nodejs/http @nodejs/net
7879

7980
# http2
8081

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
@@ -4329,6 +4329,9 @@ Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLeng
43294329

43304330
<!-- YAML
43314331
changes:
4332+
- version: REPLACEME
4333+
pr-url: https://github.com/nodejs/node/pull/58535
4334+
description: Runtime deprecation.
43324335
- version:
43334336
- v24.6.0
43344337
- v22.19.0

0 commit comments

Comments
 (0)