diff options
Diffstat (limited to 'src/http/modules/ngx_http_static_handler.c')
-rw-r--r-- | src/http/modules/ngx_http_static_handler.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c index c8a014164..480e641a3 100644 --- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c @@ -40,14 +40,15 @@ int ngx_http_static_handler(ngx_http_request_t *r) "ngx_http_static_handler: " ngx_open_file_n " %s failed", r->file.name.data); - if (err == NGX_ENOENT) + if (err == NGX_ENOENT) { return NGX_HTTP_NOT_FOUND; -#if (WIN32) - else if (err == ERROR_PATH_NOT_FOUND) + + } else if (err == NGX_ENOTDIR) { return NGX_HTTP_NOT_FOUND; -#endif - else + + } else { return NGX_HTTP_INTERNAL_SERVER_ERROR; + } } if (!r->file.info_valid) { |