From 14107c2187e988aac805a318fe113d531785c9a9 Mon Sep 17 00:00:00 2001
From: Osher <osher.filter@gmail.com>
Date: Tue, 12 May 2020 18:29:09 +0300
Subject: [PATCH] http: tidy up exposure of header validation

---
 lib/_http_outgoing.js | 5 ++---
 lib/http.js           | 7 +++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 2e639535ee4a9e..83f79fac0fabeb 100644
--- a/lib/_http_outgoing.js
+++ b/lib/_http_outgoing.js
@@ -918,9 +918,8 @@ function(err, event) {
   this.destroy(err);
 };
 
-OutgoingMessage.validateHeaderName = validateHeaderName;
-OutgoingMessage.validateHeaderValue = validateHeaderValue;
-
 module.exports = {
+  validateHeaderName,
+  validateHeaderValue,
   OutgoingMessage
 };
diff --git a/lib/http.js b/lib/http.js
index 2b01e1edf5ea19..4bbe42e652c24e 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -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,