调整类重载,修复部分BUG,增加请求头检查

This commit is contained in:
UnknownObject
2026-08-05 14:15:47 +08:00
parent 557cc8b995
commit 0d50588ea7
30 changed files with 1816 additions and 157 deletions
+7 -7
View File
@@ -41,7 +41,7 @@ public:
{
if (server == nullptr)
return;
server->set_buffer_size(10240);
server->set_buffer_size(65535);
SCLOGF_INFO("ServerCore thread ready: {} Worker(s), {} Loop(s)", worker_thread, loop_thread);
server->Run(worker_thread, loop_thread);
return;
@@ -142,9 +142,9 @@ bool ServerCore::AppenedProcessor(std::string url, ServerProcessorPtr ptr, std::
auto adapter = std::make_shared<uns::ServerProcessorAdapter>(ptr);
bool bret = pimpl->ccServer->Route(webcc::UrlRegex(url), adapter, Impl::ConvertMethods(methods));
if (bret)
SCLOG_INFO("ServerProcessor added. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_INFO("ServerProcessor added. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
else
SCLOG_ERROR("ServerProcessor add faliure. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_ERROR("ServerProcessor add faliure. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
return bret;
}
@@ -156,9 +156,9 @@ bool ServerCore::AppenedFileReceiver(std::string url, FileReceiverPtr ptr, std::
auto adapter = std::make_shared<uns::FileReceiverAdapter>(ptr);
bool bret = pimpl->ccServer->Route(webcc::UrlRegex(url), adapter, Impl::ConvertMethods(methods));
if (bret)
SCLOG_INFO("FileReceiver added. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_INFO("FileReceiver added. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
else
SCLOG_ERROR("FileReceiver add faliure. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_ERROR("FileReceiver add faliure. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
return bret;
}
@@ -169,9 +169,9 @@ bool ServerCore::AppenedFileReceiver(std::string url, SyncFileReceiverPtr ptr, s
auto adapter = std::make_shared<uns::SyncFileReceiverAdapter>(ptr);
bool bret = pimpl->ccServer->Route(webcc::UrlRegex(url), adapter, Impl::ConvertMethods(methods));
if (bret)
SCLOG_INFO("SyncFileReceiver added. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_INFO("SyncFileReceiver added. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
else
SCLOG_ERROR("SyncFileReceiver add faliure. URL: [%s], Method code: <%s>", url.c_str(), uns::toBinary(methods, 10).c_str());
SCLOGF_ERROR("SyncFileReceiver add faliure. URL: [{}], Method code: <{}>", url, uns::toBinary(methods, 10));
return bret;
}