mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 09:42:39 +08:00
Autoindex: improved ngx_de_info() error handling.
This allows to build a directory listing whenever a loop exists in symbolic link resolution of the path argument.
This commit is contained in:
parent
eb3fed9338
commit
2b2def7891
@ -304,7 +304,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
|
||||
if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) {
|
||||
err = ngx_errno;
|
||||
|
||||
if (err != NGX_ENOENT) {
|
||||
if (err != NGX_ENOENT && err != NGX_ELOOP) {
|
||||
ngx_log_error(NGX_LOG_CRIT, r->connection->log, err,
|
||||
ngx_de_info_n " \"%s\" failed", filename);
|
||||
|
||||
|
@ -49,10 +49,10 @@ typedef int ngx_err_t;
|
||||
#define NGX_ECANCELED ECANCELED
|
||||
#define NGX_EILSEQ EILSEQ
|
||||
#define NGX_ENOMOREFILES 0
|
||||
#define NGX_ELOOP ELOOP
|
||||
|
||||
#if (NGX_HAVE_OPENAT)
|
||||
#define NGX_EMLINK EMLINK
|
||||
#define NGX_ELOOP ELOOP
|
||||
#endif
|
||||
|
||||
#if (__hpux__)
|
||||
|
@ -51,6 +51,7 @@ typedef DWORD ngx_err_t;
|
||||
#define NGX_EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#define NGX_ENOMOREFILES ERROR_NO_MORE_FILES
|
||||
#define NGX_EILSEQ ERROR_NO_UNICODE_TRANSLATION
|
||||
#define NGX_ELOOP 0
|
||||
|
||||
#define NGX_EALREADY WSAEALREADY
|
||||
#define NGX_EINVAL WSAEINVAL
|
||||
|
Loading…
Reference in New Issue
Block a user