Skip to content

Commit

Permalink
Fix const map access
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Sep 19, 2024
1 parent a8b185d commit 3f7d050
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3948,7 +3948,7 @@ R"x*x*x(<html>
res.set(http::field::date, server_date_string());
auto ext = strutil::to_lower(index_html.extension().string());
if (global_mimes.count(ext))
res.set(http::field::content_type, global_mimes[ext]);
res.set(http::field::content_type, global_mimes.at(ext));
else
res.set(http::field::content_type, "text/plain");
res.keep_alive(request.keep_alive());
Expand Down Expand Up @@ -4184,7 +4184,7 @@ R"x*x*x(<html>
auto ext = strutil::to_lower(fs::path(path).extension().string());

if (global_mimes.count(ext))
res.set(http::field::content_type, global_mimes[ext]);
res.set(http::field::content_type, global_mimes.at(ext));
else
res.set(http::field::content_type, "text/plain");

Expand Down

0 comments on commit 3f7d050

Please sign in to comment.