From: Torsten Robitzki <Torsten@Robitzki.de>
To: rack-devel@googlegroups.com
Subject: Re: rational for rewind()
Date: Sat, 19 Jul 2014 02:55:52 -0700 (PDT) [thread overview]
Message-ID: <082b48f0-dfdc-470f-83d9-123bd54f48d9@googlegroups.com> (raw)
In-Reply-To: <CABGa_T8mMGh57AkEAdFFoG19ms27DN-rp8ZRWw1AZ_RVDnjbhQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]
Hello,
Am Freitag, 18. Juli 2014 01:10:03 UTC+2 schrieb raggi:
> Agreed. I generally think a lot of concerns that used to be in middleware
> should not be so (e.g. chunking and content-length), but this concern
> actually could be handled by middleware so apps that want it can add it in
> the appropriate place in the chain. This would remove the responsibility
> from the server authors, which opens up a lot of potential optimizations
> and flexibility. We also lack a lot of potentially useful security
> considerations in this area (i.e. both static and dynamic configurable
> limits).
>
depending on how much middlewares need this feature, it might be more
effective to implement the buffering in the server as this is the part of
the stack that is nearest to the metal.
Maybe we could propose an API for middle wares that need rewinding and then
do a reference implementation that could be implemented naively in ruby and
added onto of all existing server implementations. I think such an API
needs to address:
- that in case that no middleware needs to rewind, the input needs not to
be buffered
- in case the middlewares just need to peek into the beginning of the
input, only that beginning of the stream have to be buffered.
- it should as backward compatible as possible. At least no middleware that
does not use rewind() should see a difference.
regards,
Torsten
--
---
You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 2213 bytes --]
prev parent reply other threads:[~2014-07-19 9:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 21:12 rational for rewind() Torsten Robitzki
2014-05-23 10:46 ` Magnus Holm
2014-05-24 12:35 ` Torsten Robitzki
2014-06-30 22:16 ` Daniel Doubrovkine
2014-07-15 4:30 ` James Tucker
2014-07-17 22:34 ` Eric Wong
2014-07-17 23:10 ` James Tucker
2014-07-17 23:44 ` Eric Wong
2014-07-18 0:00 ` James Tucker
2014-07-18 0:43 ` Eric Wong
2014-07-19 9:55 ` Torsten Robitzki [this message]
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=082b48f0-dfdc-470f-83d9-123bd54f48d9@googlegroups.com \
--to=rack-devel@googlegroups.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).