Nginx has custom response code '499' which means the client closed connection whilst the response sending wasn't completed yet.
We're under attack and it'd be useful to call die() if such case detected and not to waste any server resource further.
So, is there any way to detect?
Unsure whether the question should be here or at ServerFault.