@@ -67,7 +67,6 @@ public class StopException extends RuntimeException {
6767 private IRubyObject on_body ;
6868 private IRubyObject on_message_complete ;
6969
70- private IRubyObject status ;
7170 private IRubyObject requestUrl ;
7271 private IRubyObject requestPath ;
7372 private IRubyObject queryString ;
@@ -114,18 +113,6 @@ public RubyHttpParser(final Ruby runtime, RubyClass clazz) {
114113 private void initSettings () {
115114 this .settings = new ParserSettings ();
116115
117- this .settings .on_status = new HTTPDataCallback () {
118- public int cb (http_parser .lolevel .HTTPParser p , ByteBuffer buf , int pos , int len ) {
119- byte [] data = fetchBytes (buf , pos , len );
120- if (runtime .is1_9 () || runtime .is2_0 ()) {
121- ((RubyString ) status ).cat (data , 0 , data .length , UTF8 );
122- } else {
123- ((RubyString ) status ).cat (data );
124- }
125- return 0 ;
126- }
127- };
128-
129116 this .settings .on_url = new HTTPDataCallback () {
130117 public int cb (http_parser .lolevel .HTTPParser p , ByteBuffer buf , int pos , int len ) {
131118 byte [] data = fetchBytes (buf , pos , len );
@@ -222,14 +209,12 @@ public int cb(http_parser.lolevel.HTTPParser p) {
222209 headers = new RubyHash (runtime );
223210
224211 if (runtime .is1_9 () || runtime .is2_0 ()) {
225- status = RubyString .newEmptyString (runtime , UTF8 );
226212 requestUrl = RubyString .newEmptyString (runtime , UTF8 );
227213 requestPath = RubyString .newEmptyString (runtime , UTF8 );
228214 queryString = RubyString .newEmptyString (runtime , UTF8 );
229215 fragment = RubyString .newEmptyString (runtime , UTF8 );
230216 upgradeData = RubyString .newEmptyString (runtime , UTF8 );
231217 } else {
232- status = RubyString .newEmptyString (runtime );
233218 requestUrl = RubyString .newEmptyString (runtime );
234219 requestPath = RubyString .newEmptyString (runtime );
235220 queryString = RubyString .newEmptyString (runtime );
@@ -331,8 +316,7 @@ private void init() {
331316 this .parser = new HTTPParser ();
332317 this .parser .HTTP_PARSER_STRICT = true ;
333318 this .headers = null ;
334-
335- this .status = runtime .getNil ();
319+
336320 this .requestUrl = runtime .getNil ();
337321 this .requestPath = runtime .getNil ();
338322 this .queryString = runtime .getNil ();
@@ -469,11 +453,6 @@ public IRubyObject getHeaders() {
469453 return headers == null ? runtime .getNil () : headers ;
470454 }
471455
472- @ JRubyMethod (name = "status" )
473- public IRubyObject getStatus () {
474- return status == null ? runtime .getNil () : status ;
475- }
476-
477456 @ JRubyMethod (name = "request_url" )
478457 public IRubyObject getRequestUrl () {
479458 return requestUrl == null ? runtime .getNil () : requestUrl ;
0 commit comments