comparison src/http/ngx_http_core_module.c @ 3533:bb5376f3f585

do not add tested file to a location regex string, instead, set URI to the tested file, or keep URI unchanged, if the tested file is a directory, the later allows to handle a directory autoredirect
author Igor Sysoev <igor@sysoev.ru>
date Thu, 27 May 2010 13:24:19 +0000
parents a8966b3c1fcf
children 3711bb1336c3
comparison
equal deleted inserted replaced
3532:a8966b3c1fcf 3533:bb5376f3f585
1280 path.data += root; 1280 path.data += root;
1281 1281
1282 if (!alias) { 1282 if (!alias) {
1283 r->uri = path; 1283 r->uri = path;
1284 1284
1285 #if (NGX_PCRE)
1286 } else if (clcf->regex) {
1287 if (!test_dir) {
1288 r->uri = path;
1289 }
1290 #endif
1285 } else { 1291 } else {
1286 r->uri.len = alias + path.len; 1292 r->uri.len = alias + path.len;
1287 r->uri.data = ngx_pnalloc(r->pool, r->uri.len); 1293 r->uri.data = ngx_pnalloc(r->pool, r->uri.len);
1288 if (r->uri.data == NULL) { 1294 if (r->uri.data == NULL) {
1289 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 1295 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);