Mercurial > hg > nginx
comparison src/http/modules/ngx_http_autoindex_module.c @ 1499:090e391f53db
fix file leak for HEAD requests
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 22 Sep 2007 17:56:05 +0000 |
parents | d8e2613a2b55 |
children | bf5521329069 |
comparison
equal
deleted
inserted
replaced
1498:d23d9b5969e7 | 1499:090e391f53db |
---|---|
234 r->headers_out.content_type.data = (u_char *) "text/html"; | 234 r->headers_out.content_type.data = (u_char *) "text/html"; |
235 | 235 |
236 rc = ngx_http_send_header(r); | 236 rc = ngx_http_send_header(r); |
237 | 237 |
238 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | 238 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { |
239 if (ngx_close_dir(&dir) == NGX_ERROR) { | |
240 ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno, | |
241 ngx_close_dir_n " \"%V\" failed", &path); | |
242 } | |
243 | |
239 return rc; | 244 return rc; |
240 } | 245 } |
241 | 246 |
242 filename = path.data; | 247 filename = path.data; |
243 filename[path.len] = '/'; | 248 filename[path.len] = '/'; |