Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ int handleHTTPRequest(struct client *c, char *p) {
snprintf(ctype, sizeof ctype, MODES_CONTENT_TYPE_HTML); // Default content type
ext = strrchr(getFile, '.');

if (strlen(ext) > 0) {
if (ext) {
if (strstr(ext, ".json")) {
snprintf(ctype, sizeof ctype, MODES_CONTENT_TYPE_JSON);
} else if (strstr(ext, ".css")) {
Expand Down