mirror of
https://github.com/simon987/sist2.git
synced 2025-12-11 14:38:54 +00:00
Return 404 when thumbnail is not found
This commit is contained in:
@@ -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");
|
||||
mg_send(nc, data, data_len);
|
||||
free(data);
|
||||
} else {
|
||||
mg_http_reply(nc, 404, "Content-Type: text/plain;charset=utf-8\r\n", "Not found");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user