Don't forget the part of code in ngx_http_subrequest():

     sr->raw_uri = r->raw_uri;
     sr->unparsed_uri = r->unparsed_uri;
     sr->method_name = ngx_http_core_get_method;
     sr->http_protocol = r->http_protocol;