Thanks. the general idea of that patch is similar to mine but better. So I'll apply it. If you can tell me why you feel that patch is not enough, I can help to improve it. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,214541,214605#msg-214605