mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-30 02:37:57 +08:00
Update trantor (#656)
* Update trantor * Make some minor modifications.
This commit is contained in:
parent
d2f291689d
commit
ce704aff5b
@ -168,8 +168,8 @@ void press::handleCommand(std::vector<std::string> ¶meters)
|
||||
// std::cout << "c=" << numOfConnections_ << std::endl;
|
||||
// std::cout << "q=" << processIndication_ << std::endl;
|
||||
// std::cout << "url=" << url_ << std::endl;
|
||||
if (url_.empty() || url_.find("http") != 0 ||
|
||||
url_.find("://") == std::string::npos)
|
||||
if (url_.empty() || url_.compare(0, 4, "http") != 0 ||
|
||||
(url_.compare(4, 3, "://") != 0 && url_.compare(4, 4, "s://") != 0))
|
||||
{
|
||||
outputErrorAndExit("Invalid URL");
|
||||
}
|
||||
|
@ -26,5 +26,5 @@ class TestPlugin : public Plugin<TestPlugin>
|
||||
private:
|
||||
std::thread workThread_;
|
||||
bool stop_{false};
|
||||
int interval_;
|
||||
int interval_{0};
|
||||
};
|
||||
|
@ -238,12 +238,17 @@ void WebSocketClientImpl::onRecvMessage(
|
||||
{
|
||||
resp->parseJson();
|
||||
}
|
||||
|
||||
if (resp->getHeaderBy("content-encoding") == "gzip")
|
||||
auto &coding = resp->getHeaderBy("content-encoding");
|
||||
if (coding == "gzip")
|
||||
{
|
||||
resp->gunzip();
|
||||
}
|
||||
|
||||
#ifdef USE_BROTLI
|
||||
else if (coding == "br")
|
||||
{
|
||||
resp->brDecompress();
|
||||
}
|
||||
#endif
|
||||
upgraded_ = true;
|
||||
websockConnPtr_ =
|
||||
std::make_shared<WebSocketConnectionImpl>(connPtr, false);
|
||||
|
@ -56,7 +56,7 @@ struct SqlCmd
|
||||
ExceptPtrCallback exceptionCallback_;
|
||||
std::string preparingStatement_;
|
||||
#if LIBPQ_SUPPORTS_BATCH_MODE
|
||||
bool isChanging_;
|
||||
bool isChanging_{false};
|
||||
#endif
|
||||
SqlCmd(string_view &&sql,
|
||||
const size_t paraNum,
|
||||
|
2
trantor
2
trantor
@ -1 +1 @@
|
||||
Subproject commit 8e0af4aaa1bc2fb6eb1e1e2f310fa1d070c5e1d2
|
||||
Subproject commit 38bfde8f37cbedcc4d98cc1784947c6c7734cef0
|
Loading…
Reference in New Issue
Block a user