Skip to content

Commit

Permalink
http: tidy up exposure of header validation
Browse files Browse the repository at this point in the history
  • Loading branch information
osher committed May 14, 2020
1 parent 0ddae48 commit 14107c2
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 @@ -918,9 +918,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 14107c2

Please sign in to comment.