mirror of
https://github.com/nginx/nginx.git
synced 2024-11-24 13:49:05 +08:00
Perl: named locations in $r->internal_redirect().
This commit is contained in:
parent
8df08b02b8
commit
29fea7d9ec
@ -257,15 +257,21 @@ ngx_http_perl_handle_request(ngx_http_request_t *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uri.len) {
|
if (uri.len) {
|
||||||
ngx_str_null(&args);
|
if (uri.data[0] == '@') {
|
||||||
flags = NGX_HTTP_LOG_UNSAFE;
|
ngx_http_named_location(r, &uri);
|
||||||
|
|
||||||
if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) {
|
} else {
|
||||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
ngx_str_null(&args);
|
||||||
return;
|
flags = NGX_HTTP_LOG_UNSAFE;
|
||||||
|
|
||||||
|
if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) {
|
||||||
|
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngx_http_internal_redirect(r, &uri, &args);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_http_internal_redirect(r, &uri, &args);
|
|
||||||
ngx_http_finalize_request(r, NGX_DONE);
|
ngx_http_finalize_request(r, NGX_DONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user