diff --git a/src/node.cc b/src/node.cc index 87a2bb48fb..f6dbc3227d 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1597,10 +1597,6 @@ static Handle Binding(const Arguments& args) { StatWatcher::Initialize(exports); File::Initialize(exports); binding_cache->Set(module, exports); - } else if (!strcmp(*module_v, "http_parser")) { - exports = Object::New(); - InitHttpParser(exports); - binding_cache->Set(module, exports); } else if (!strcmp(*module_v, "child_process")) { exports = Object::New(); ChildProcess::Initialize(exports); diff --git a/src/node_extensions.h b/src/node_extensions.h index 8ec1d53993..ed63a4548d 100644 --- a/src/node_extensions.h +++ b/src/node_extensions.h @@ -5,6 +5,7 @@ NODE_EXT_LIST_ITEM(node_cares) NODE_EXT_LIST_ITEM(node_crypto) #endif NODE_EXT_LIST_ITEM(node_net) +NODE_EXT_LIST_ITEM(node_http_parser) NODE_EXT_LIST_ITEM(node_signal_watcher) NODE_EXT_LIST_ITEM(node_stdio) NODE_EXT_LIST_END diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 61992e0882..0ca04bd143 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -473,3 +473,4 @@ void InitHttpParser(Handle target) { } // namespace node +NODE_MODULE(node_http_parser, node::InitHttpParser);