From 4d39a3586c9df33ab22c7f59888c4497c9ab0e41 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 12 May 2009 11:39:42 +0200 Subject: [PATCH] Path, URI, Fragment, etc were not getting passed to RequestHandler. --- src/http.cc | 7 +++---- src/http.js | 16 ++++++++-------- src/node.cc | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/http.cc b/src/http.cc index 96e9800311c..c59e6607a91 100644 --- a/src/http.cc +++ b/src/http.cc @@ -21,15 +21,14 @@ #define ON_BODY_SYMBOL String::NewSymbol("onBody") #define ON_MESSAGE_COMPLETE_SYMBOL String::NewSymbol("onMessageComplete") -#define STATUS_CODE_SYMBOL String::NewSymbol("status_code") -#define HTTP_VERSION_SYMBOL String::NewSymbol("http_version") -#define SHOULD_KEEP_ALIVE_SYMBOL String::NewSymbol("should_keep_alive") +#define STATUS_CODE_SYMBOL String::NewSymbol("status_code") +#define HTTP_VERSION_SYMBOL String::NewSymbol("http_version") +#define SHOULD_KEEP_ALIVE_SYMBOL String::NewSymbol("should_keep_alive") using namespace v8; using namespace node; using namespace std; - Persistent HTTPConnection::client_constructor_template; Persistent HTTPConnection::server_constructor_template; diff --git a/src/http.js b/src/http.js index fdc1e8973b7..cc7c7aa750a 100644 --- a/src/http.js +++ b/src/http.js @@ -210,16 +210,16 @@ node.http.Server = function (RequestHandler, options) { this.encoding = req.encoding || "raw"; - var path = req.path = ""; - var uri = req.uri = ""; - var query_string = req.query_string = ""; - var fragment = req.fragment = ""; + req.path = ""; + req.uri = ""; + req.query_string = ""; + req.fragment = ""; var headers = req.headers = []; - this.onPath = function (data) { path += data; return true }; - this.onURI = function (data) { uri += data; return true }; - this.onQueryString = function (data) { query_string += data; return true; }; - this.onFragment = function (data) { fragment += data; return true; }; + this.onPath = function (data) { req.path += data; return true }; + this.onURI = function (data) { req.uri += data; return true }; + this.onQueryString = function (data) { req.query_string += data; return true; }; + this.onFragment = function (data) { req.fragment += data; return true; }; var last_was_value = false; diff --git a/src/node.cc b/src/node.cc index a7d9a8dc8cf..36d8bebbdea 100644 --- a/src/node.cc +++ b/src/node.cc @@ -293,6 +293,7 @@ main (int argc, char *argv[]) ev_loop(EV_DEFAULT_UC_ 0); context.Dispose(); + V8::Dispose(); return exit_code;