Welcome! Log In Create A New Profile

Advanced

problem in writing handler module which should be called via ssi

July 21, 2010 04:28AM
hi

i have a problem while writing an nginx module which i want to
generate secure download links, which can then be verified by the
NginxHttpSecureDownload module and later maybe also the secure link
module. i wrote it as a content handler which can then be called over
an ssi include, like in the following example:

<a href="<!--# include virtual="/gen_sec_link/this_is_my_link" -->">my link</a>

together with the nginx conf:


location / {
ssi on;
root html;
}

location /gen_sec_link {
generate_secure_download_link_expiration_time 3600;
generate_secure_download_link_secret $remote_addr;
generate_secure_download_link_url $uri;
generate_secure_download_link;
}

the result will be something like:

<a href="/gen_sec_link/this_is_my_link/3c5e04f315af807f3e757abd49dc14d3/4C46ABAF">my
link</a>

by using SSI i can save all the pattern matching and operating on the
buffer chain, thats why i did it as handler module, instead of an
output filter.

i pushed the code to github:

http://github.com/replay/ngx_http_generate_secure_download_links

now my problem is that sometimes when i request many times from one
browser it just never closes the connection and the browser seems to
keep loading. first i thought the problem might be a mistake in the
calculation of the content-length, but after many tests i believe that
the content length that i give back is correct. i'm guessing that i
missed something to tell nginx that the content is really finished
now. on the other hand its strange that i only have this problem after
refreshing a page which i requested already, the first request is
always working.

i would be glad for a few tips what else i have to check,

thanks,

mauro

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

problem in writing handler module which should be called via ssi

replay July 21, 2010 04:28AM

Re: problem in writing handler module which should be called via ssi

replay July 22, 2010 02:18AM

Re: problem in writing handler module which should be called via ssi

Weibin Yao July 22, 2010 03:44AM

Re: problem in writing handler module which should be called via ssi

replay July 22, 2010 04:14AM

Re: problem in writing handler module which should be called via ssi

Weibin Yao July 22, 2010 05:50AM

Re: problem in writing handler module which should be called via ssi

replay July 23, 2010 03:20AM

Re: problem in writing handler module which should be called via ssi

replay July 26, 2010 10:32PM

Re: problem in writing handler module which should be called via ssi

replay July 26, 2010 10:34PM

Re: problem in writing handler module which should be called via ssi

replay July 27, 2010 04:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready