Skip to content

Commit c2aad81

Browse files
oshercodebytere
authored andcommitted
http: tidy up exposure of header validation
PR-URL: #33371 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a90c9aa commit c2aad81

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/_http_outgoing.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -909,9 +909,8 @@ function(err, event) {
909909
this.destroy(err);
910910
};
911911

912-
OutgoingMessage.validateHeaderName = validateHeaderName;
913-
OutgoingMessage.validateHeaderValue = validateHeaderValue;
914-
915912
module.exports = {
913+
validateHeaderName,
914+
validateHeaderValue,
916915
OutgoingMessage
917916
};

lib/http.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ const httpAgent = require('_http_agent');
2929
const { ClientRequest } = require('_http_client');
3030
const { methods } = require('_http_common');
3131
const { IncomingMessage } = require('_http_incoming');
32-
const { OutgoingMessage } = require('_http_outgoing');
33-
const { validateHeaderName, validateHeaderValue } = OutgoingMessage;
32+
const {
33+
validateHeaderName,
34+
validateHeaderValue,
35+
OutgoingMessage
36+
} = require('_http_outgoing');
3437
const {
3538
_connectionListener,
3639
STATUS_CODES,

0 commit comments

Comments
 (0)