Skip to content

Commit e30a651

Browse files
osherBridgeAR
authored andcommittedMay 25, 2020
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 e24731c commit e30a651

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
@@ -919,9 +919,8 @@ function(err, event) {
919919
this.destroy(err);
920920
};
921921

922-
OutgoingMessage.validateHeaderName = validateHeaderName;
923-
OutgoingMessage.validateHeaderValue = validateHeaderValue;
924-
925922
module.exports = {
923+
validateHeaderName,
924+
validateHeaderValue,
926925
OutgoingMessage
927926
};

‎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)