Forum: NGINX post_action only when the download is completed

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
on 2008-11-15 01:42
(Received via mailing list)
i have a problem with post_action on nginx.conf.
And sorry for my bad English  :)

User come to my page an start a download.
Now i have add the post_action and add the download_end.php
in the download_end.php i will count the download stats (write into
That work very beautifully without any error.

The problem is now, when the user cancel the download
download_end.php will execute, but thats false!

Only when the download is realy completed, than i will open
but NOT when the user canceled the download!

Are there any tricks?

Thank you for your help

       location /files/ {
           alias /home/files/;
           post_action /download-stop;

       location /download-stop {
           fastcgi_param SCRIPT_FILENAME
           fastcgi_param QUERY_STRING     file_id=$file_id; //thats ok!
           fastcgi_param   REMOTE_ADDR     $remote_addr;
This topic is locked and can not be replied to.