mirror of
https://github.com/simon987/sist2.git
synced 2025-04-18 17:56:44 +00:00
Return 404 when thumbnail is not found
This commit is contained in:
parent
d5a47b8dab
commit
ba31531d3a
@ -178,6 +178,9 @@ void thumbnail(struct mg_connection *nc, struct mg_http_message *hm) {
|
|||||||
send_response_line(nc, 200, data_len, "Content-Type: image/jpeg");
|
send_response_line(nc, 200, data_len, "Content-Type: image/jpeg");
|
||||||
mg_send(nc, data, data_len);
|
mg_send(nc, data, data_len);
|
||||||
free(data);
|
free(data);
|
||||||
|
} else {
|
||||||
|
mg_http_reply(nc, 404, "Content-Type: text/plain;charset=utf-8\r\n", "Not found");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user