aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/http.cpp
diff options
context:
space:
mode:
authorkulikov <kulikov@yandex-team.ru>2022-02-10 16:49:34 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:34 +0300
commitc707901605d7b7c6cba0998cd52e1ae619c97762 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/server/http.cpp
parent65e5266709e7ff94b14ae128309e229de714b0df (diff)
downloadydb-c707901605d7b7c6cba0998cd52e1ae619c97762.tar.gz
Restoring authorship annotation for <kulikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/server/http.cpp')
-rw-r--r--library/cpp/http/server/http.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp
index 3d21108b02..128583bdd7 100644
--- a/library/cpp/http/server/http.cpp
+++ b/library/cpp/http/server/http.cpp
@@ -1,5 +1,5 @@
#include "http.h"
-#include "http_ex.h"
+#include "http_ex.h"
#include <library/cpp/threading/equeue/equeue.h>
@@ -243,17 +243,17 @@ public:
}
void AddRequest(TAutoPtr<TClientRequest> req, bool fail) {
- struct TFailRequest: public THttpClientRequestEx {
+ struct TFailRequest: public THttpClientRequestEx {
inline TFailRequest(TAutoPtr<TClientRequest> parent) {
Conn_.Reset(parent->Conn_.Release());
HttpConn_.Reset(parent->HttpConn_.Release());
}
bool Reply(void*) override {
- if (!ProcessHeaders()) {
+ if (!ProcessHeaders()) {
return true;
- }
-
+ }
+
ProcessFailRequest(0);
return true;
}
@@ -558,11 +558,11 @@ TClientConnection::TClientConnection(const TSocket& s, THttpServer::TImpl* serv,
{
SetNoDelay(Socket_, true);
- const TDuration& clientTimeout = HttpServ_->Options().ClientTimeout;
- if (clientTimeout != TDuration::Zero()) {
+ const TDuration& clientTimeout = HttpServ_->Options().ClientTimeout;
+ if (clientTimeout != TDuration::Zero()) {
SetSocketTimeout(Socket_, (long)clientTimeout.Seconds(), clientTimeout.MilliSecondsOfSecond());
- }
-
+ }
+
HttpServ_->IncreaseConnections();
}
@@ -679,16 +679,16 @@ void TClientRequest::ResetConnection() {
void TClientRequest::Process(void* ThreadSpecificResource) {
THolder<TClientRequest> this_(this);
- auto* serverImpl = Conn_->HttpServ_;
-
+ auto* serverImpl = Conn_->HttpServ_;
+
try {
if (!HttpConn_) {
- const size_t outputBufferSize = HttpServ()->Options().OutputBufferSize;
- if (outputBufferSize) {
- HttpConn_.Reset(new THttpServerConn(Socket(), outputBufferSize));
- } else {
- HttpConn_.Reset(new THttpServerConn(Socket()));
- }
+ const size_t outputBufferSize = HttpServ()->Options().OutputBufferSize;
+ if (outputBufferSize) {
+ HttpConn_.Reset(new THttpServerConn(Socket(), outputBufferSize));
+ } else {
+ HttpConn_.Reset(new THttpServerConn(Socket()));
+ }
auto maxRequestsPerConnection = HttpServ()->Options().MaxRequestsPerConnection;
HttpConn_->Output()->EnableKeepAlive(HttpServ()->Options().KeepAliveEnabled && (!maxRequestsPerConnection || Conn_->ReceivedRequests < maxRequestsPerConnection));
@@ -715,7 +715,7 @@ void TClientRequest::Process(void* ThreadSpecificResource) {
return;
}
} catch (...) {
- serverImpl->Cb_->OnException();
+ serverImpl->Cb_->OnException();
throw;
}