Patrick Brosi 4 years ago
parent
commit
f634ca27bb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/osmfixer/server/StatServer.cpp

+ 2 - 2
src/osmfixer/server/StatServer.cpp

@@ -24,10 +24,10 @@ util::http::Answer StatServer::handle(const util::http::Req& req,
24
     auto cmd = parseUrl(req.url, req.payload, &params);
24
     auto cmd = parseUrl(req.url, req.payload, &params);
25
 
25
 
26
     if (cmd == "/") {
26
     if (cmd == "/") {
27
-      a = util::http::Answer("200 OK", reinterpret_cast<const char*>(index_html));
27
+      a = util::http::Answer("200 OK", std::string(index_html, index_html + sizeof index_html / sizeof index_html[0]));
28
       a.params["Content-Type"] = "text/html; charset=utf-8";
28
       a.params["Content-Type"] = "text/html; charset=utf-8";
29
     } else if (cmd == "/build.js") {
29
     } else if (cmd == "/build.js") {
30
-      a = util::http::Answer("200 OK", reinterpret_cast<const char*>(build_js));
30
+      a = util::http::Answer("200 OK", std::string(build_js, build_js + sizeof build_js / sizeof build_js[0]));
31
       a.params["Content-Type"] = "application/javascript; charset=utf-8";
31
       a.params["Content-Type"] = "application/javascript; charset=utf-8";
32
     } else if (cmd == "/map") {
32
     } else if (cmd == "/map") {
33
       a = handleMapReq(params);
33
       a = handleMapReq(params);