diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 6d343be1..ef4b9881 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -613,7 +613,7 @@ int Http2Handler::submit_file_response(const std::string& status, nghttp2_data_provider *data_prd) { std::string date_str = util::http_date(time(0)); - std::string content_length = util::to_str(file_length); + std::string content_length = util::utos(file_length); std::string last_modified_str; auto nva = std::vector{ http2::make_nv_ls(":status", status), diff --git a/src/util.h b/src/util.h index ee3c789f..48de2fb5 100644 --- a/src/util.h +++ b/src/util.h @@ -212,14 +212,6 @@ std::string http_date(time_t t); time_t parse_http_date(const std::string& s); -template -std::string to_str(T value) -{ - std::stringstream ss; - ss << value; - return ss.str(); -} - template bool startsWith (InputIterator1 first1,