Hello Maxim (and community)! First, I am a huge fan of freenginx. I have switched all my installations to use freenginx and support your tremendous effort to protect the community.
I was writing a module when I noticed that using NGX_DECLINED as the rc when calling ngx_http_finalize_request causes an infinite loop because the phase handler index is not updated before phase processing is resumed. A simple one-line change seems to fix the problem. I have prepared a patch and tried very hard to make sure that I followed all the rules for contributing. That said, I am sure that I missed a step or did something wrong. If the patch is helpful but needs changes, please let me know -- I would be more than happy to get things fixed up appropriately. I have run all tests with the patch applied and everything seems to pass. Thank you, again, for all that you do.