Mercurial > hg > nginx
comparison src/http/modules/perl/ngx_http_perl_module.c @ 7533:5f642712e7ad
Perl: named locations in $r->internal_redirect().
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 12 Jul 2019 15:39:28 +0300 |
parents | 975d7ab37b39 |
children |
comparison
equal
deleted
inserted
replaced
7532:975d7ab37b39 | 7533:5f642712e7ad |
---|---|
255 ngx_http_finalize_request(r, NGX_DONE); | 255 ngx_http_finalize_request(r, NGX_DONE); |
256 return; | 256 return; |
257 } | 257 } |
258 | 258 |
259 if (uri.len) { | 259 if (uri.len) { |
260 ngx_str_null(&args); | 260 if (uri.data[0] == '@') { |
261 flags = NGX_HTTP_LOG_UNSAFE; | 261 ngx_http_named_location(r, &uri); |
262 | 262 |
263 if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) { | 263 } else { |
264 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 264 ngx_str_null(&args); |
265 return; | 265 flags = NGX_HTTP_LOG_UNSAFE; |
266 } | 266 |
267 | 267 if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) { |
268 ngx_http_internal_redirect(r, &uri, &args); | 268 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
269 return; | |
270 } | |
271 | |
272 ngx_http_internal_redirect(r, &uri, &args); | |
273 } | |
274 | |
269 ngx_http_finalize_request(r, NGX_DONE); | 275 ngx_http_finalize_request(r, NGX_DONE); |
270 return; | 276 return; |
271 } | 277 } |
272 | 278 |
273 if (rc == NGX_OK || rc == NGX_HTTP_OK) { | 279 if (rc == NGX_OK || rc == NGX_HTTP_OK) { |