Commit d0271a90 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpd: Use util::utos instead of slow util::to_str

parent 20ffe2b2
......@@ -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<nghttp2_nv>{
http2::make_nv_ls(":status", status),
......
......@@ -212,14 +212,6 @@ std::string http_date(time_t t);
time_t parse_http_date(const std::string& s);
template<typename T>
std::string to_str(T value)
{
std::stringstream ss;
ss << value;
return ss.str();
}
template<typename InputIterator1, typename InputIterator2>
bool startsWith
(InputIterator1 first1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment