From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS24940 5.9.0.0/16 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,RCVD_IN_XBL,SPF_FAIL, SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (tor-relay.zwiebeltoralf.de [5.9.158.75]) by dcvr.yhbt.net (Postfix) with ESMTP id D16462022D for ; Sat, 5 Nov 2016 02:07:40 +0000 (UTC) From: Eric Wong To: http_spew-public@bogomips.org Subject: [PATCH 1/2] request: drop to_path support Date: Sat, 5 Nov 2016 02:07:36 +0000 Message-Id: <20161105020737.1616-1-e@80x24.org> List-Id: It is too complex for sockets due to unknown response lengths and no actively developed servers take advantage of it. --- lib/http_spew/request.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/http_spew/request.rb b/lib/http_spew/request.rb index 63bac64..3c3ef7e 100644 --- a/lib/http_spew/request.rb +++ b/lib/http_spew/request.rb @@ -2,8 +2,7 @@ # This is the base class actually capable of making a normal HTTP request class HTTP_Spew::Request - # May be called by some Rack servers such as Rainbows! to bypass - # +to_path+ calls and avoid path lookups. + # May be called by IO.select or for use with IO#wait_*able attr_reader :to_io # Stores any exception that was raised in another thread (e.g. @@ -95,12 +94,6 @@ class HTTP_Spew::Request @response = r << self end - # Used by some Rack-compatible servers to optimize transfers - # by using IO.copy_stream - def to_path - "/dev/fd/#{@to_io.fileno}" - end - def too_big! # :nodoc: raise HTTP_Spew::RequestError.new(self), "response headers too large", [] end -- EW