rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Torsten Robitzki <Torsten@Robitzki.de>
To: rack-devel@googlegroups.com
Subject: rational for rewind()
Date: Thu, 22 May 2014 14:12:09 -0700 (PDT)	[thread overview]
Message-ID: <b47d2d00-0fa1-46d5-8f16-0704813a8e81@googlegroups.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

Hello,
I'm implementing a C++ comet web server, that (tries) to implement rack to 
adapt ruby applications. Currently I'm reading a body very naively put the 
body into a ruby String and wrap it with a StringIO to provide the 
rack.input for the implementation. As I'm going to use the server for 
uploading images, I would like to implement a real, stream-like object to 
circumvent the need to buffer the POST body before handing it to the 
application.

Now, I've read the rack specs and read about rewind(). To implement 
rewind(), I would have to store the whole body, even when the upstream 
application just calculates some kind of checksum on the body, or uploads 
it to s3. What's the rational behind this part of the specification? Is it 
possible to not implement rewind() and to tell applications that need 
rewind(), to keep there own copy of the body, in case it is needed? 

kind 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: 1476 bytes --]

             reply	other threads:[~2014-05-22 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 21:12 Torsten Robitzki [this message]
2014-05-23 10:46 ` rational for rewind() 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

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=b47d2d00-0fa1-46d5-8f16-0704813a8e81@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).