Permalink
Browse files

http_parser: expose `parser.boundary`

Requires new `http_parser` (with mmalecki/http-parser@b7136a7 included).

Fixes #2612.
  • Loading branch information...
1 parent 3f43b1c commit 82f3eebd4fb4130204e09bb6f325252bd39e6dcc @mmalecki committed Feb 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/node_http_parser.cc
View
@@ -83,6 +83,7 @@ static Persistent<String> unsubscribe_sym;
static Persistent<String> unknown_method_sym;
static Persistent<String> method_sym;
+static Persistent<String> boundary_sym;
static Persistent<String> status_code_sym;
static Persistent<String> http_version_sym;
static Persistent<String> version_major_sym;
@@ -315,6 +316,9 @@ class Parser : public ObjectWrap {
message_info->Set(status_code_sym, Integer::New(parser_.status_code));
}
+ // BOUNDARY
+ message_info->Set(boundary_sym, Integer::New(parser_.boundary));
+
// VERSION
message_info->Set(version_major_sym, Integer::New(parser_.http_major));
message_info->Set(version_minor_sym, Integer::New(parser_.http_minor));
@@ -636,6 +640,7 @@ void InitHttpParser(Handle<Object> target) {
unknown_method_sym = NODE_PSYMBOL("UNKNOWN_METHOD");
method_sym = NODE_PSYMBOL("method");
+ boundary_sym = NODE_PSYMBOL("boundary");
status_code_sym = NODE_PSYMBOL("statusCode");
http_version_sym = NODE_PSYMBOL("httpVersion");
version_major_sym = NODE_PSYMBOL("versionMajor");

0 comments on commit 82f3eeb

Please sign in to comment.