3 messages in ru.sysoev.nginxRe: module's development and X-Accel-...
FromSent OnAttachments
Chavelle VincentMar 30, 2008 9:40 am 
Maxim DouninMar 30, 2008 11:37 am 
Chavelle VincentMar 31, 2008 3:47 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: module's development and X-Accel-RedirectActions...
From:Maxim Dounin (mdou@public.gmane.org)
Date:Mar 30, 2008 11:37:49 am
List:ru.sysoev.nginx

Hello!

On Sun, Mar 30, 2008 at 06:40:51PM +0200, Chavelle Vincent wrote:

Hi all

My problem refers to the development of a new module for nginx and I need to use X-Accel-Redirect header to implement controlled downloads...

I have followed http://blog.kovyrin.net/2006/11/01/nginx-x-accel-redirect-php-rails/ and I have replaced php code : header("X-Accel-Redirect: /files/" . $path) by a new module for nginx (http://www.pasteyourcode.com/pastebin.php?show=686)

Nothing happens and i don't know why ! I need advices :)

Processing of 'X-Accel-Redirect' header resides in ngx_http_upstream.c, i.e. it's handled only by proxy_pass/fastcgi_pass/memcached_pass.

When writing nginx module you should use ngx_http_internal_redirect() function instead.