diff --git a/.pkg b/.pkg index 8754d9f..82de56f 100644 --- a/.pkg +++ b/.pkg @@ -1,7 +1,7 @@ [boost] url=git@github.com:motis-project/boost.git branch=master - commit=60cae66449fa3c9599b2b7d3d5d44c65301ed3a3 + commit=73549ebca677fe6214202a1ab580362b4f80e653 [osmium] url=git@github.com:motis-project/libosmium.git branch=master @@ -17,7 +17,7 @@ [cista] url=git@github.com:felixguendling/cista.git branch=master - commit=777618a9a96a9bfbf44edc64686c0c17eb1afd05 + commit=5b2ca78d1af99941ea41e195dc3a29b4f05e1b77 [googletest] url=git@github.com:motis-project/googletest.git branch=master @@ -30,14 +30,14 @@ url=git@github.com:motis-project/protozero.git branch=master commit=8c9f3fa97c2cfdceef86d0b61818ae98e9328f29 -[zlib] - url=git@github.com:motis-project/zlib.git - branch=master - commit=8e7c86d3a0e49101b9a67d74c4a07345dcb0e485 +[zlib-ng] + url=git@github.com:motis-project/zlib-ng.git + branch=develop + commit=68ab3e2d80253ec5dc3c83691d9ff70477b32cd3 [tiles] url=git@github.com:motis-project/tiles.git branch=master - commit=649e1c190e63b2d0de5cbc693093355fa0476010 + commit=f7208d4e05661abbf09e4f284de0112a445f6b0a [mimalloc] url=git@github.com:motis-project/mimalloc.git branch=master @@ -65,4 +65,4 @@ [net] url=git@github.com:motis-project/net.git branch=master - commit=44674d2f3917e20b7019a0f7254d332522c36fb7 + commit=75611343512242c64a5b3f50f3a660a17298339d diff --git a/exe/backend/src/http_server.cc b/exe/backend/src/http_server.cc index 8e37ed0..f1b35ca 100644 --- a/exe/backend/src/http_server.cc +++ b/exe/backend/src/http_server.cc @@ -210,9 +210,12 @@ struct http_server::impl { void handle_static(web_server::http_req_t const& req, web_server::http_res_cb_t const& cb) { - if (!serve_static_files_ || - !net::serve_static_file(static_file_path_, req, cb)) { - return cb(net::not_found_response(req)); + if (auto res = net::serve_static_file(static_file_path_, req); + res.has_value()) { + cb(std::move(*res)); + } else { + namespace http = boost::beast::http; + cb(net::web_server::string_res_t{http::status::not_found, req.version()}); } } diff --git a/include/osr/types.h b/include/osr/types.h index 1793035..d691d3f 100644 --- a/include/osr/types.h +++ b/include/osr/types.h @@ -144,7 +144,7 @@ constexpr level_t to_level(float const f) { } constexpr float to_float(level_t const l) { - return kMinLevel + (to_idx(l) / 4.0F); + return l == level_t::invalid() ? 0.0F : (kMinLevel + (to_idx(l) / 4.0F)); } constexpr auto const kLevelBits = cista::constexpr_trailing_zeros(