Fix mime-check
For "" to actually go through, strcmp should only check for the length of the extension string.
This commit is contained in:
parent
93f27cd081
commit
dc82dd9705
1 changed files with 3 additions and 1 deletions
4
quark.c
4
quark.c
|
@ -209,7 +209,9 @@ responsefile(void) {
|
|||
if ((p = strrchr(reqbuf, '.'))) {
|
||||
p++;
|
||||
for (i = 0; i < LENGTH(servermimes); i++)
|
||||
if (!strcmp(servermimes[i].extension, p)) {
|
||||
if (!strncmp(servermimes[i].extension, p,
|
||||
strlen(servermimes[i].extension)))
|
||||
{
|
||||
mimetype = servermimes[i].mimetype;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue