https://github.com/replay/ngx_http_lower_upper_case would be the easiest solution. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255565,255570#msg-255570