13 messages in ru.sysoev.nginxRe: Best way to get $request_filename
FromSent OnAttachments
TinyApps.OrgJul 15, 2009 9:25 am 
Gena MakhomedJul 15, 2009 10:02 am 
TinyApps.OrgJul 15, 2009 10:26 am 
Gena MakhomedJul 15, 2009 11:06 am 
Marcus ClyneJul 15, 2009 12:13 pm 
Maxim DouninJul 15, 2009 12:37 pm 
Marcus ClyneJul 15, 2009 3:27 pm 
Marcus ClyneJul 15, 2009 4:25 pm 
Maxim DouninJul 15, 2009 6:20 pm 
TinyApps.OrgJul 16, 2009 12:45 am 
Marcus ClyneJul 16, 2009 5:52 am 
AMP AdminAug 14, 2009 9:59 pm 
Cliff WellsAug 15, 2009 10:38 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: Best way to get $request_filenameActions...
From:Marcus Clyne (macc@gmail.com)
Date:Jul 15, 2009 3:27:50 pm
List:ru.sysoev.nginx

Maxim Dounin wrote:

Hello!

On Wed, Jul 15, 2009 at 10:13:26PM +0300, Marcus Clyne wrote:

Hi,

What's the best way to get the variable $request_filename from a custom module?

Currently I save the index of the $request_filename variable and call ngx_http_get_indexed_variable (r, request_filename_var_index), but is there a better way?

If you need variable - using indexed one is the best choise.

For request filename you may want to consider using ngx_http_map_uri_to_path() directly though. See static module (or gzip static, or flv, or request_filename variable get handler code) for examples.

Thanks.