|
|
@ -129,8 +129,6 @@ HTTPConnection::OnEOF () |
|
|
|
int |
|
|
|
HTTPConnection::on_message_begin (http_parser *parser) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
|
if (message_begin_symbol.IsEmpty()) { |
|
|
|
method_symbol = NODE_PSYMBOL("method"); |
|
|
|
status_code_symbol = NODE_PSYMBOL("statusCode"); |
|
|
@ -186,7 +184,6 @@ HTTPConnection::on_message_complete (http_parser *parser) |
|
|
|
int |
|
|
|
HTTPConnection::on_url (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
Local<Value> argv[1] = { String::New(buf, len) }; |
|
|
@ -197,7 +194,6 @@ HTTPConnection::on_url (http_parser *parser, const char *buf, size_t len) |
|
|
|
int |
|
|
|
HTTPConnection::on_query_string (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
Local<Value> argv[1] = { String::New(buf, len) }; |
|
|
@ -208,7 +204,6 @@ HTTPConnection::on_query_string (http_parser *parser, const char *buf, size_t le |
|
|
|
int |
|
|
|
HTTPConnection::on_path (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
Local<Value> argv[1] = { String::New(buf, len) }; |
|
|
@ -219,7 +214,6 @@ HTTPConnection::on_path (http_parser *parser, const char *buf, size_t len) |
|
|
|
int |
|
|
|
HTTPConnection::on_fragment (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
Local<Value> argv[1] = { String::New(buf, len) }; |
|
|
@ -240,7 +234,6 @@ const static char normalizer[] = |
|
|
|
int |
|
|
|
HTTPConnection::on_header_field (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
|
|
|
@ -257,7 +250,6 @@ HTTPConnection::on_header_field (http_parser *parser, const char *buf, size_t le |
|
|
|
int |
|
|
|
HTTPConnection::on_header_value (http_parser *parser, const char *buf, size_t len) |
|
|
|
{ |
|
|
|
HandleScope scope; |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*>(parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
|
|
|
@ -293,7 +285,6 @@ HTTPConnection::on_headers_complete (http_parser *parser) |
|
|
|
{ |
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*> (parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
|
Local<Object> message_info = Object::New(); |
|
|
|
|
|
|
@ -339,7 +330,6 @@ HTTPConnection::on_body (http_parser *parser, const char *buf, size_t len) |
|
|
|
|
|
|
|
HTTPConnection *connection = static_cast<HTTPConnection*> (parser->data); |
|
|
|
assert(connection->refs_); |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
|
// TODO each message should have their encoding.
|
|
|
|
// don't look at the conneciton for encoding
|
|
|
|