rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Theo Cushion <mrtheo@gmail.com>
To: rack-devel@googlegroups.com
Subject: Rack::Sendfile and X-Accel-Mapping
Date: Wed, 18 Jul 2012 09:20:49 -0700 (PDT)	[thread overview]
Message-ID: <0840a6b3-1fbf-499e-b5f2-0fd63fbf1abf@googlegroups.com> (raw)

[-- 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 --]

                 reply	other threads:[~2012-07-18 16:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=0840a6b3-1fbf-499e-b5f2-0fd63fbf1abf@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).