From ba63e7496d8de37010a84123dac31bc90fc7b431 Mon Sep 17 00:00:00 2001 From: Felix Ingram Date: Mon, 9 Feb 2015 08:40:41 +0000 Subject: [PATCH] Re-export HTTP parsers This change reverses 299cf84490a2f28ffdc4c82e4fb7078ac591b6d3. Having HTTP parsers exported is useful when needing to debug HTTP connections (accessing raw buffers in particular). An example usage can be found here: http://miensol.pl/2014/03/23/nonintrusive-http-proxy-in-nodejs.html NB: Commit message for 299cf84490a2f28ffdc4c82e4fb7078ac591b6d3 mentions that a different name might be needed, as changes to the parsers' lifecycle may break existing usage. --- lib/http.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/http.js b/lib/http.js index a9cfeddeea5cfa..6678453f50e012 100644 --- a/lib/http.js +++ b/lib/http.js @@ -9,6 +9,7 @@ exports.IncomingMessage = require('_http_incoming').IncomingMessage; const common = require('_http_common'); exports.METHODS = common.methods.slice().sort(); +exports.parsers = common.parsers; exports.OutgoingMessage = require('_http_outgoing').OutgoingMessage;