mirror of
https://github.com/nginx/nginx.git
synced 2026-05-28 04:12:47 -04:00
fix file leak for HEAD requests
This commit is contained in:
parent
884d634db4
commit
34ebeb60eb
1 changed files with 5 additions and 0 deletions
|
|
@ -236,6 +236,11 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
|
|||
rc = ngx_http_send_header(r);
|
||||
|
||||
if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
|
||||
if (ngx_close_dir(&dir) == NGX_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno,
|
||||
ngx_close_dir_n " \"%V\" failed", &path);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue