# HG changeset patch # User Igor Sysoev # Date 1239119408 0 # Node ID 6c8a5165ed2a5f115e2adcc3d4296b1f695f24b1 # Parent c944cba169e3491e742321299d0270820651cbd3 fix r2590: error_page made an external redirect without query string diff -r c944cba169e3 -r 6c8a5165ed2a src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c Mon Apr 06 13:43:46 2009 +0000 +++ b/src/http/ngx_http_core_module.c Tue Apr 07 15:50:08 2009 +0000 @@ -3875,7 +3875,7 @@ args.len = 0; args.data = NULL; - if (cv.lengths == NULL) { + if (cv.lengths == NULL && uri.data[0] == '/') { p = (u_char *) ngx_strchr(uri.data, '?'); if (p) { diff -r c944cba169e3 -r 6c8a5165ed2a src/http/ngx_http_special_response.c --- a/src/http/ngx_http_special_response.c Mon Apr 06 13:43:46 2009 +0000 +++ b/src/http/ngx_http_special_response.c Tue Apr 07 15:50:08 2009 +0000 @@ -451,14 +451,14 @@ return NGX_ERROR; } - if (err_page->value.lengths) { - ngx_http_split_args(r, &uri, &args); + if (uri.data[0] == '/') { - } else { - args = err_page->args; - } + if (err_page->value.lengths) { + ngx_http_split_args(r, &uri, &args); - if (uri.data[0] == '/') { + } else { + args = err_page->args; + } if (r->method != NGX_HTTP_HEAD) { r->method = NGX_HTTP_GET;