@@ -39,11 +39,11 @@ int ClientIO::init_env(CephContext *cct)
3939 const auto & value = header->value ();
4040
4141 if (field == beast::http::field::content_length) {
42- env.set (" CONTENT_LENGTH" , value. to_string ( ));
42+ env.set (" CONTENT_LENGTH" , std::string (value ));
4343 continue ;
4444 }
4545 if (field == beast::http::field::content_type) {
46- env.set (" CONTENT_TYPE" , value. to_string ( ));
46+ env.set (" CONTENT_TYPE" , std::string (value ));
4747 continue ;
4848 }
4949
@@ -62,26 +62,26 @@ int ClientIO::init_env(CephContext *cct)
6262 }
6363 *dest = ' \0 ' ;
6464
65- env.set (buf, value. to_string ( ));
65+ env.set (buf, std::string (value ));
6666 }
6767
6868 int major = request.version () / 10 ;
6969 int minor = request.version () % 10 ;
7070 env.set (" HTTP_VERSION" , std::to_string (major) + ' .' + std::to_string (minor));
7171
72- env.set (" REQUEST_METHOD" , request.method_string (). to_string ( ));
72+ env.set (" REQUEST_METHOD" , std::string ( request.method_string ()));
7373
7474 // split uri from query
7575 auto uri = request.target ();
7676 auto pos = uri.find (' ?' );
7777 if (pos != uri.npos ) {
7878 auto query = uri.substr (pos + 1 );
79- env.set (" QUERY_STRING" , query. to_string ( ));
79+ env.set (" QUERY_STRING" , std::string (query ));
8080 uri = uri.substr (0 , pos);
8181 }
82- env.set (" SCRIPT_URI" , uri. to_string ( ));
82+ env.set (" SCRIPT_URI" , std::string (uri ));
8383
84- env.set (" REQUEST_URI" , request.target (). to_string ( ));
84+ env.set (" REQUEST_URI" , std::string ( request.target ()));
8585
8686 char port_buf[16 ];
8787 snprintf (port_buf, sizeof (port_buf), " %d" , local_endpoint.port ());
0 commit comments