Skip to content

Commit

Permalink
http: tidy up exposure of header validation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
osher authored and codebytere committed Jun 30, 2020
1 parent f0bca4a commit de69354
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,8 @@ function(err, event) {
this.destroy(err);
};

OutgoingMessage.validateHeaderName = validateHeaderName;
OutgoingMessage.validateHeaderValue = validateHeaderValue;

module.exports = {
validateHeaderName,
validateHeaderValue,
OutgoingMessage
};
7 changes: 5 additions & 2 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ const httpAgent = require('_http_agent');
const { ClientRequest } = require('_http_client');
const { methods } = require('_http_common');
const { IncomingMessage } = require('_http_incoming');
const { OutgoingMessage } = require('_http_outgoing');
const { validateHeaderName, validateHeaderValue } = OutgoingMessage;
const {
validateHeaderName,
validateHeaderValue,
OutgoingMessage
} = require('_http_outgoing');
const {
_connectionListener,
STATUS_CODES,
Expand Down

0 comments on commit de69354

Please sign in to comment.