summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_static.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_static.c')
-rw-r--r--src/nxt_http_static.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_http_static.c b/src/nxt_http_static.c
index c9483b63..8964dbbf 100644
--- a/src/nxt_http_static.c
+++ b/src/nxt_http_static.c
@@ -571,7 +571,9 @@ nxt_http_static_send_ready(nxt_task_t *task, void *obj, void *data)
/* Not a file. */
nxt_file_close(task, f);
- if (nxt_slow_path(!nxt_is_dir(&fi))) {
+ if (nxt_slow_path(!nxt_is_dir(&fi)
+ || shr->start[shr->length - 1] == '/'))
+ {
nxt_log(task, NXT_LOG_ERR, "\"%FN\" is not a regular file",
f->name);