NGINX perl module to server files

Jorge Sanchez xsanch at gmail.com
Sat Aug 31 21:46:52 UTC 2013


Hello,

I have created  perl NGINX module to server static files on the NGINX
(mainly images). For security reasons I am generating the AES:CBC encrypted
url which I am decrypting on the NGINX and serving the file via NGINX perl
module. The problem is that I am sometimes getting the bellow response with
HTTP response code set to 000:


XX.XX.XX.XX - - [01/Sep/2013:01:20:37 +0400] "GET
/media/u5OU/NRkImrrwH/TThHe7hns5bOEv+Aou2/VJ8YD/ts= HTTP/1.1" *000* 39078 "
http://XXXX/full/JcbyEJTb8nMh+YH0xSg1jgl4N7vWQi2xBPep7VcJmD8=<http://gruppu.com/full/JcbyEJTb8nMh+YH0xSg1jgl4N7vWQi2xBPep7VcJmD8=>"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101
Firefox/23.0"


The way how I handle the url in the perl module is :

In case the file is found:
$r->sendfile($fileresult[0]);
$r->flush();
return OK;

else:
$r->status(404);
return DECLINED;


My question is if I am sending the files correctly or is there any other
specific value i should send back from perl (besides returning OK).

If needed I can send the nginx.conf.


Thanks for your help.

Regards,


Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130831/5726ab15/attachment.html>


More information about the nginx mailing list