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

Commit

Permalink
process: expose the http_parser version in process.versions
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate authored and bnoordhuis committed Mar 9, 2012
1 parent ff4a9d3 commit 36761b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/node.cc
Expand Up @@ -2079,6 +2079,9 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
Local<Object> versions = Object::New();
char buf[20];
process->Set(String::NewSymbol("versions"), versions);
versions->Set(String::NewSymbol("http_parser"), String::New(
NODE_STRINGIFY(HTTP_PARSER_VERSION_MAJOR) "."
NODE_STRINGIFY(HTTP_PARSER_VERSION_MINOR)));
// +1 to get rid of the leading 'v'
versions->Set(String::NewSymbol("node"), String::New(NODE_VERSION+1));
versions->Set(String::NewSymbol("v8"), String::New(V8::GetVersion()));
Expand Down
2 changes: 0 additions & 2 deletions src/node_http_parser.cc
Expand Up @@ -25,8 +25,6 @@
#include "node.h"
#include "node_buffer.h"

#include "http_parser.h"

#include <string.h> /* strdup() */
#if !defined(_MSC_VER)
#include <strings.h> /* strcasecmp() */
Expand Down
2 changes: 2 additions & 0 deletions src/node_http_parser.h
Expand Up @@ -24,6 +24,8 @@

#include "v8.h"

#include "http_parser.h"

namespace node {

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

0 comments on commit 36761b2

Please sign in to comment.