Add default file name if URL is a directory, giving index.html behavior. From Kate

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5162 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-09-18 18:45:39 +00:00
parent 7d318ee113
commit e9474a7707
3 changed files with 66 additions and 9 deletions
+12
View File
@@ -89,6 +89,18 @@ int httpd_mmap_open(const char *name, struct httpd_fs_file *file)
return ERROR;
}
if (S_ISDIR(st.st_mode))
{
errno = EISDIR;
return ERROR;
}
if (!S_ISREG(st.st_mode))
{
errno = ENOENT;
return ERROR;
}
if (st.st_size > INT_MAX)
{
errno = EFBIG;