rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Does Rack-servers block until the whole request body has been read?
@ 2011-04-13  7:17 Daniel Abrahamsson
  2011-04-25 14:26 ` Joshua Ballanco
  2011-04-26  1:16 ` Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Abrahamsson @ 2011-04-13  7:17 UTC (permalink / raw)
  To: rack-devel

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

Hi,

I am working on a server that deals with large file uploads (currently built 
upon Rails, with a Metal taking care of the uploads). According to the 
rack-specification:
"... handler developers must buffer the input data into some rewindable 
object if the underlying input stream is not rewindable".

For Passenger and Mongrel, this means a temp file is created for the request 
(at least for requests as big as those I am dealing with).

Now, my question is, does Rack wait until all data from the client has been 
read to a tempfile before passing on control to the Rack app (in this case, 
Rails)? Or does it pass on control directly, and block if the application 
reads data faster than the client is sending it?

After some initial testing, it appears to me that the former is the case. 
Can anyone give me advice on how to test this? Perhaps it depends on the web 
server used? Perhaps on the framework?

Thank you in advance for any advance or clarification on this matter.

//Daniel

[-- Attachment #2: Type: text/html, Size: 1030 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-26  1:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13  7:17 Does Rack-servers block until the whole request body has been read? Daniel Abrahamsson
2011-04-25 14:26 ` Joshua Ballanco
2011-04-26  1:16 ` Eric Wong

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).