Skip to content

Commit 3f7d050

Browse files
committed
Fix const map access
1 parent a8b185d commit 3f7d050

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

proxy/include/proxy/proxy_server.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3948,7 +3948,7 @@ R"x*x*x(<html>
39483948
res.set(http::field::date, server_date_string());
39493949
auto ext = strutil::to_lower(index_html.extension().string());
39503950
if (global_mimes.count(ext))
3951-
res.set(http::field::content_type, global_mimes[ext]);
3951+
res.set(http::field::content_type, global_mimes.at(ext));
39523952
else
39533953
res.set(http::field::content_type, "text/plain");
39543954
res.keep_alive(request.keep_alive());
@@ -4184,7 +4184,7 @@ R"x*x*x(<html>
41844184
auto ext = strutil::to_lower(fs::path(path).extension().string());
41854185

41864186
if (global_mimes.count(ext))
4187-
res.set(http::field::content_type, global_mimes[ext]);
4187+
res.set(http::field::content_type, global_mimes.at(ext));
41884188
else
41894189
res.set(http::field::content_type, "text/plain");
41904190

0 commit comments

Comments
 (0)