The ngx_http_parse_complex_uri() function is part of a request parsing code, optimized for the specific task of parsing URI of a request in case it's complex and can't be parsed by ngx_http_parse_request_line(). It's not a generic URI parsing function and never was intended to be.
So, do you mean that nginx is meant to not have such "generic URI parsing function" at all? Okay - do you think it's sufficient just to change ngx_unescape_uri(&dst, &src, uri->len, 0); to ngx_unescape_uri(&dst, &src, uri->len, NGX_UNESCAPE_URI); in the previous patch? (i.e. in http://www.coderain.de/nginx/nginx-0.8.52-xred.patch)
P.S: what's NGX_UNESCAPE_REDIRECT?