Everywhere: Make session->content_type() callable

This commit is contained in:
Alec Murphy 2025-02-21 18:03:12 -05:00
parent 614e68194b
commit ff5a07dc04
10 changed files with 43 additions and 26 deletions

View file

@ -1,23 +1,23 @@
if (String.EndsWith(".css", @slon_http_request_path(session))) {
@slon_http_set_content_type(session, "text/css");
session->content_type("text/css");
@slon_http_send_file(session, "M:/Slon/Static/css/main.css");
return;
}
if (!StrICmp("/js/header.js", @slon_http_request_path(session))) {
@slon_http_set_content_type(session, "text/javascript");
session->content_type("text/javascript");
@slon_http_send_file(session, "M:/Slon/Static/js/header.js");
return;
}
if (String.EndsWith(".js", @slon_http_request_path(session))) {
@slon_http_set_content_type(session, "text/javascript");
session->content_type("text/javascript");
@slon_http_send_file(session, "M:/Slon/Static/js/statuses.js");
return;
}
if (!StrICmp("/alec.png", @slon_http_request_path(session))) {
@slon_http_set_content_type(session, "image/png");
session->content_type("image/png");
@slon_http_send_file(session, "A:/avatar-circle-4bpp.png");
return;
}