Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 14107c2

Browse files
committedMay 14, 2020
http: tidy up exposure of header validation
1 parent 0ddae48 commit 14107c2

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

921-
OutgoingMessage.validateHeaderName = validateHeaderName;
922-
OutgoingMessage.validateHeaderValue = validateHeaderValue;
923-
924921
module.exports = {
922+
validateHeaderName,
923+
validateHeaderValue,
925924
OutgoingMessage
926925
};

‎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)
Please sign in to comment.