webnet
webnet copied to clipboard
修复加载默认页面(index.html./index.htm)启用GZIP后http报404问题
场景: 开启webnet的gzip压缩模块,然后将所有页面都压缩为.gz文件
问题: 源代码查找默认index页(default_files)时未判断对应的.gz文件是否存在,导致浏览器报404错误
/* default index file */
static const char *default_files[] =
{
"",
"/index.html",
"/index.htm",
RT_NULL
};