[PATCH] Document body.to_path in SPEC
Reported by Ryan Tomayko | December 28th, 2008 @ 10:00 AM | in 1.0
For bodies that have a corresponding file on disk (Rack::File, Rails-like #send_file implementations, etc.), it's useful to have the option of using low-level system calls like sendfile(2) or the X-Sendfile support built into most web servers. In order to do this, we need a reliable way of determining if a body has an on-disk representation.
This was discussed in more detail on the mailing list:
http://groups.google.com/group/r...
The following patch adds a note to the SPEC to make body.to_path explicitly supported:
If the Body responds to #to_path, it must return a String identifying
the location of a file whose contents are identical to that produced
by calling #each.
Rack::File has been modified to produce bodies that respond to #to_path and Rack::Lint checks that the files given in #to_path exist and will WARN on rack.errors if not.
Comments and changes to this ticket
-
Matt Todd December 28th, 2008 @ 10:07 AM
This was my favorite of the ideas presented, plus the simplicity of the implementation kinda confirms this.
-
chneukirchen (at gmail) December 28th, 2008 @ 01:20 PM
We can merge this after 0.9, it is a spec change. (OTOH, it is not incompatible...)
-
Ryan Tomayko December 29th, 2008 @ 10:45 AM
- Milestone set to 1.0
- Assigned user set to Ryan Tomayko
-
Ryan Tomayko February 9th, 2009 @ 04:41 AM
- State changed from new to resolved
Merged in 2a506e8:
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป