]> git.kaiwu.me - nginx.git/commitdiff
set content-type for try_files' choice
authorIgor Sysoev <igor@sysoev.ru>
Sat, 14 Feb 2009 17:26:26 +0000 (17:26 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sat, 14 Feb 2009 17:26:26 +0000 (17:26 +0000)
src/http/ngx_http_core_module.c

index a21da0f3bcaededc35cca922307934cc914d779e..3f5cb29dcb2e76495a15421b7593722564defe58 100644 (file)
@@ -1197,6 +1197,11 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
             ngx_memcpy(p, name, path.len);
         }
 
+        if (ngx_http_set_exten(r) != NGX_OK) {
+            ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+            return NGX_OK;
+        }
+
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                        "try file uri: \"%V\"", &r->uri);