updated to the new pikotools api: changed utf8 functions PascalCase to snake_case

This commit is contained in:
2021-05-21 00:41:27 +02:00
parent 8c523ce8b9
commit 8bb585d97d
25 changed files with 99 additions and 99 deletions

View File

@@ -182,13 +182,13 @@ void App::InitPlugins()
bool App::InitFCGI(char * sock, char * sock_user, char * sock_group)
{
if( !WideToUTF8(config.fcgi_socket, sock, WINIX_OS_PATH_SIZE) )
if( !wide_to_utf8(config.fcgi_socket, sock, WINIX_OS_PATH_SIZE) )
return false;
if( !WideToUTF8(config.fcgi_socket_user, sock_user, WINIX_OS_USERNAME_SIZE) )
if( !wide_to_utf8(config.fcgi_socket_user, sock_user, WINIX_OS_USERNAME_SIZE) )
return false;
if( !WideToUTF8(config.fcgi_socket_group, sock_group, WINIX_OS_USERNAME_SIZE) )
if( !wide_to_utf8(config.fcgi_socket_group, sock_group, WINIX_OS_USERNAME_SIZE) )
return false;
return true;
@@ -934,7 +934,7 @@ void App::SetEnv(const char * name, std::wstring & env)
if( v )
{
pt::UTF8ToWide(v, env);
pt::utf8_to_wide(v, env);
}
}
@@ -1031,8 +1031,8 @@ bool App::SaveEnvHTTPVariable(const char * env)
return false;
}
pt::UTF8ToWide(header_name, http_header_name);
pt::UTF8ToWide(header_value, http_header_value);
pt::utf8_to_wide(header_name, http_header_name);
pt::utf8_to_wide(header_value, http_header_value);
cur.request->headers_in.add(http_header_name, http_header_value);
http_header_name.clear();
@@ -1052,7 +1052,7 @@ void App::ReadEnvRemoteIP()
http_header_name += config.proxy_ip_header;
pt::to_upper_emplace(http_header_name);
pt::WideToUTF8(http_header_name, http_header_8bit);
pt::wide_to_utf8(http_header_name, http_header_8bit);
v = FCGX_GetParam(http_header_8bit.c_str(), fcgi_request.envp);
}
else
@@ -1063,7 +1063,7 @@ void App::ReadEnvRemoteIP()
if( v )
{
cur.request->ip = (int)inet_addr(v);
pt::UTF8ToWide(v, cur.request->ip_str);
pt::utf8_to_wide(v, cur.request->ip_str);
}
}
@@ -1494,8 +1494,8 @@ void App::SendHeaders()
{
if( i->second->is_wstr() )
{
pt::WideToUTF8(i->first, aheader_name);
pt::WideToUTF8(*i->second->get_wstr(), aheader_value);
pt::wide_to_utf8(i->first, aheader_name);
pt::wide_to_utf8(*i->second->get_wstr(), aheader_value);
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
FCGX_PutS(": ", fcgi_request.out);
@@ -1528,8 +1528,8 @@ void App::SendCookies()
{
if( i->second->is_wstr() )
{
pt::WideToUTF8(i->first, aheader_name);
pt::WideToUTF8(*i->second->get_wstr(), aheader_value);
pt::wide_to_utf8(i->first, aheader_name);
pt::wide_to_utf8(*i->second->get_wstr(), aheader_value);
FCGX_PutS("Set-Cookie: ", fcgi_request.out);
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
@@ -1788,7 +1788,7 @@ size_t output_size = 0;
SelectCompression(source->length(), compressing, compress_encoding);
pt::WideToUTF8(*source, output_8bit);
pt::wide_to_utf8(*source, output_8bit);
// !! IMPROVE ME add to log the binary stream as well
if( config.log_server_answer )
@@ -2022,10 +2022,10 @@ void App::LogUserGroups()
bool App::DropPrivileges(char * user, char * group)
{
if( !WideToUTF8(config.user, user, WINIX_OS_USERNAME_SIZE) )
if( !wide_to_utf8(config.user, user, WINIX_OS_USERNAME_SIZE) )
return false;
if( !WideToUTF8(config.group, group, WINIX_OS_USERNAME_SIZE) )
if( !wide_to_utf8(config.group, group, WINIX_OS_USERNAME_SIZE) )
return false;
return true;
@@ -2270,7 +2270,7 @@ int sig;
app->synchro.was_stop_signal = true;
FCGX_ShutdownPending();
pt::WideToUTF8(app->config.fcgi_socket, app->socket_to_send_on_exit);
pt::wide_to_utf8(app->config.fcgi_socket, app->socket_to_send_on_exit);
app->Unlock();
app->SendEmptyFastCGIPacket();