From: Eric Wong <e@80x24.org>
To: http_spew-public@bogomips.org
Subject: [PATCH 1/2] request: drop to_path support
Date: Sat, 5 Nov 2016 02:07:36 +0000 [thread overview]
Message-ID: <20161105020737.1616-1-e@80x24.org> (raw)
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
next reply other threads:[~2016-11-05 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-05 2:07 Eric Wong [this message]
2016-11-05 2:07 ` [PATCH 2/2] explicitly clear large buf when it is obviously safe Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/http_spew/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161105020737.1616-1-e@80x24.org \
--to=e@80x24.org \
--cc=http_spew-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/http_spew.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox