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, ...@@ -613,7 +613,7 @@ int Http2Handler::submit_file_response(const std::string& status,
nghttp2_data_provider *data_prd) nghttp2_data_provider *data_prd)
{ {
std::string date_str = util::http_date(time(0)); 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; std::string last_modified_str;
auto nva = std::vector<nghttp2_nv>{ auto nva = std::vector<nghttp2_nv>{
http2::make_nv_ls(":status", status), http2::make_nv_ls(":status", status),
......
...@@ -212,14 +212,6 @@ std::string http_date(time_t t); ...@@ -212,14 +212,6 @@ std::string http_date(time_t t);
time_t parse_http_date(const std::string& s); 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> template<typename InputIterator1, typename InputIterator2>
bool startsWith bool startsWith
(InputIterator1 first1, (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