<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi Bedros,<br><br>The module you refer to is not exactly what I have requested.<br><br>The feature I propose is very simple: a method / directive to disallow serving a file which has a filetime (last modified time) set in the future. E.g. if I set the last modified time for a certain file to 4 March 2008 14:30, then any request for the file before that time would result in a 403. For any request made after that time the file will be served as usual.<br><br>Such a directive would make life a lot simpler for me since I have thousands of small static data files which should become available only from a certain time. I could pregenerate lots of files, place them in the corresponding directories (for which I switched on the directive filetime_check), set any wanted filetime (e.g. with touch) and Nginx would do all the hard :) work by returning 403 instead of the file whenever the request is made before the last modification time of the file. As simple as that ! Perl, databases, etc. are too much overhead and I would not want to use any of those for this purpose.<br><br>Hendrik Hardeman<br><br><br><br><br><blockquote>Date: Sun, 10 Feb 2008 08:54:59 -0800<br>From: 2bedros@gmail.com<br>To: nginx@sysoev.ru<br>Subject: Re: Nginx feature request<br><br>check out secdownload module in lighttpd<br><br><a href="http://trac.lighttpd.net/trac/wiki/Docs:ModSecDownload" target="_blank">http://trac.lighttpd.net/trac/wiki/Docs:ModSecDownload</a><br><br>I've already made a feature request for something like that in nginx; but I believe the developers of nginx did not think building such a module is of high priority.<br>
<br>lighttpd has a memory leak, and I'm not sure if they actually solved it (probably not). I personally prefer nginx, but I wish they build a module like secdownload.<br><br><br><br><div class="EC_gmail_quote">On Feb 10, 2008 12:56 AM, Hendrik Hardeman &lt;<a href="mailto:hendrik.hardeman@hotmail.com">hendrik.hardeman@hotmail.com</a>&gt; wrote:<br>
<blockquote class="EC_gmail_quote" style="padding-left: 1ex;">



<div>











Hi all,<br><br>Discovered Nginx a few weeks back. After some experimenting I have come to the conclusion that Nginx really is very very good.<br><br>I have a small feature request:<br><br>I
have a set of static files (html and others) which I want to make
available only from a certain date/time. Inspired by the rewrite
module, this morning I thought of a simple method to control access to
such files.<br><br>My idea was to set the file creation/modification
time of the static files in the future, i.e. the date/time from which
they can be made available (e.g. I could use the touch tool to set the
appropriate date/time). I could then do something like<br><br>if (!-f $request_filename) {return 404;}<br>if ($date_gmt &lt; fct($request_filename)) {return 403;}<br><br>Unfortunately,
I haven't found a way to get at the file creation/modification time (please do
let me know if I overlooked something). The 'fct' in my example is an
imaginary function which returns the file creation time in the same
format as $date_gmt (presumably unix epoch timestamp)<br><br>An even
better way to handle this would be to have a directive in the core
module which disallows serving files which have a creation/modification
time in the future. I could then use:<br><br>location /ftc/ {<br>&nbsp;&nbsp;&nbsp; filetime_check&nbsp;&nbsp;  on;<br>}<br><br>to disallow serving of files with a filetime in the future for that location. Files would then automatically become available once the request time &gt;= filetime. This way access to certain files could be controlled in a very straightforward and transparent way - and with a simple 'touch'.<br>
<br>Though
I'd definitely prefer a directive for the above purpose, access to file
creation/modification time (through variable or function) could still
be useful in the rewriting or ssi module.<br><br>Anyone any other suggestions ?<br><br>Thanks,<br><br>Hendrik Hardeman<br><br><hr>Post free auto ads on Yello Classifieds now!  <a href="http://ss1.richmedia.in/recurl.asp?pid=255" target="_blank">Try it now!</a></div>

</blockquote></div><br>
</blockquote><br /><hr />Post free auto ads on Yello Classifieds now!  <a href='http://ss1.richmedia.in/recurl.asp?pid=255' target='_new'>Try it now!</a></body>
</html>