Browse Source

process: expose the http_parser version in process.versions

v0.9.1-release
Nathan Rajlich 13 years ago
committed by Ben Noordhuis
parent
commit
36761b2055
  1. 3
      src/node.cc
  2. 2
      src/node_http_parser.cc
  3. 2
      src/node_http_parser.h

3
src/node.cc

@ -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()));

2
src/node_http_parser.cc

@ -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() */

2
src/node_http_parser.h

@ -24,6 +24,8 @@
#include "v8.h"
#include "http_parser.h"
namespace node {
void InitHttpParser(v8::Handle<v8::Object> target);

Loading…
Cancel
Save