rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* Rack::Sendfile and X-Accel-Mapping
@ 2012-07-18 16:20 Theo Cushion
  0 siblings, 0 replies; only message in thread
From: Theo Cushion @ 2012-07-18 16:20 UTC (permalink / raw)
  To: rack-devel

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

 

Hi,

I'm using Rack::Sendfile (via Rails) and was wondering if someone could 
explain if what I'm experiencing is deliberate, or could be changed.

I've noticed when nginx adds the header "X-Sendfile-Type: 
X-Accel-Redirect", then Rack::Sendfile will jump into action. If the header 
"X-Accel-Mapping" is missing then it will not interfere. However, if both 
of the headers are present it will take over - even if the mapping cannot 
be resolved.

This doesn't make sense to me, as if the X-Accel-Mapping does not match the 
path of the file that is being attempted to send, then surely Rack:Sendfile 
should not interfere so that the file can be sent successfully albeit 
less efficiently?

Cheers

Theo

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-18 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 16:20 Rack::Sendfile and X-Accel-Mapping Theo Cushion

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

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