diff options
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 546400539..a97791e8b 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -553,7 +553,7 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page) return NGX_ERROR; } - if (uri.data[0] == '/') { + if (uri.len && uri.data[0] == '/') { if (err_page->value.lengths) { ngx_http_split_args(r, &uri, &args); @@ -570,7 +570,7 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page) return ngx_http_internal_redirect(r, &uri, &args); } - if (uri.data[0] == '@') { + if (uri.len && uri.data[0] == '@') { return ngx_http_named_location(r, &uri); } |