Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 36761b2

Browse files
TooTallNatebnoordhuis
authored andcommitted
process: expose the http_parser version in process.versions
1 parent ff4a9d3 commit 36761b2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/node.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,9 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
20792079
Local<Object> versions = Object::New();
20802080
char buf[20];
20812081
process->Set(String::NewSymbol("versions"), versions);
2082+
versions->Set(String::NewSymbol("http_parser"), String::New(
2083+
NODE_STRINGIFY(HTTP_PARSER_VERSION_MAJOR) "."
2084+
NODE_STRINGIFY(HTTP_PARSER_VERSION_MINOR)));
20822085
// +1 to get rid of the leading 'v'
20832086
versions->Set(String::NewSymbol("node"), String::New(NODE_VERSION+1));
20842087
versions->Set(String::NewSymbol("v8"), String::New(V8::GetVersion()));

src/node_http_parser.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include "node.h"
2626
#include "node_buffer.h"
2727

28-
#include "http_parser.h"
29-
3028
#include <string.h> /* strdup() */
3129
#if !defined(_MSC_VER)
3230
#include <strings.h> /* strcasecmp() */

src/node_http_parser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include "v8.h"
2626

27+
#include "http_parser.h"
28+
2729
namespace node {
2830

2931
void InitHttpParser(v8::Handle<v8::Object> target);

0 commit comments

Comments
 (0)