Patrick Brosi 4 anos atrás
pai
commit
f634ca27bb
1 arquivos alterados com 2 adições e 2 exclusões
  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 24
     auto cmd = parseUrl(req.url, req.payload, &params);
25 25
 
26 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 28
       a.params["Content-Type"] = "text/html; charset=utf-8";
29 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 31
       a.params["Content-Type"] = "application/javascript; charset=utf-8";
32 32
     } else if (cmd == "/map") {
33 33
       a = handleMapReq(params);