Browse Source

Fix issue #44, eof on connect to http.

eof_symbol wasn't initialized until the first packet arrived.
In this case no packets arrive before the client closes the socket - eof.
v0.7.4-release
Ben Williamson 15 years ago
committed by Ryan Dahl
parent
commit
bba23c0998
  1. 2
      src/node_http.cc

2
src/node_http.cc

@ -71,6 +71,7 @@ HTTPConnection::Initialize (Handle<Object> target)
http_version_symbol = NODE_PSYMBOL("httpVersion"); http_version_symbol = NODE_PSYMBOL("httpVersion");
should_keep_alive_symbol = NODE_PSYMBOL("should_keep_alive"); should_keep_alive_symbol = NODE_PSYMBOL("should_keep_alive");
eof_symbol = NODE_PSYMBOL("eof");
delete_sym = NODE_PSYMBOL("DELETE"); delete_sym = NODE_PSYMBOL("DELETE");
get_sym = NODE_PSYMBOL("GET"); get_sym = NODE_PSYMBOL("GET");
@ -169,7 +170,6 @@ HTTPConnection::on_message_begin (http_parser *parser)
header_value_symbol = NODE_PSYMBOL("headerValue"); header_value_symbol = NODE_PSYMBOL("headerValue");
header_complete_symbol = NODE_PSYMBOL("headerComplete"); header_complete_symbol = NODE_PSYMBOL("headerComplete");
body_symbol = NODE_PSYMBOL("body"); body_symbol = NODE_PSYMBOL("body");
eof_symbol = NODE_PSYMBOL("eof");
} }
HTTPConnection *connection = static_cast<HTTPConnection*> (parser->data); HTTPConnection *connection = static_cast<HTTPConnection*> (parser->data);

Loading…
Cancel
Save