diff --git a/ext/http-parser/http-parser_ext.c b/ext/http-parser/http-parser_ext.c index 5fba445..52daf3e 100644 --- a/ext/http-parser/http-parser_ext.c +++ b/ext/http-parser/http-parser_ext.c @@ -345,29 +345,6 @@ VALUE hpe_parser_content_length( VALUE self ) } -/* - * call-seq: - * parser.reset -> nil - * - * Reset the state of the parser to what it was upon initial - * instantiation. This resets the internal state machine and allows it - * to be used again. - * - * Also be aware, that immediately following the +on_message_complete+ - * callback the Parser is also implicitly reset. Callbacks ARE NOT - * unregistered after a reset. - * - */ -VALUE hpe_parser_reset( VALUE self ) -{ - http_parser *parser; - VALUE rc; - - Data_Get_Struct( self, http_parser, parser ); - RESET_PARSER( parser ); - return Qnil; -} - /* * call-seq: * parser.parse_chunk( String ) -> nil @@ -499,7 +476,6 @@ void Init_http_parser_ext() rb_define_method( cHttpParser, "version" ,hpe_parser_version , 0 ); rb_define_method( cHttpParser, "keep_alive?" ,hpe_parser_keep_alive , 0 ); rb_define_method( cHttpParser, "content_length" ,hpe_parser_content_length , 0 ); - rb_define_method( cHttpParser, "reset" ,hpe_parser_reset , 0 ); rb_define_method( cHttpParser, "parse_chunk" ,hpe_parser_parse_chunk , 1 ); /* the common callbacks */ diff --git a/lib/http/parser_callbacks.rb b/lib/http/parser_callbacks.rb index 2716af0..5d5ab5c 100644 --- a/lib/http/parser_callbacks.rb +++ b/lib/http/parser_callbacks.rb @@ -147,8 +147,7 @@ def on_message_complete( &block ) self.on_message_complete = block ; end # an exception that happened inside a callback. # # After recieving an on_error callback, the parser is no longer useful in - # its current state. It should either be disposed of, or call - # +parser.reset+ to reset it to its initial state. + # its current state. It should be disposed of. # def on_error=(callable) @on_error_callback = callable