aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server
diff options
context:
space:
mode:
authorzdm <zdm@yandex-team.ru>2022-02-10 16:49:24 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:24 +0300
commit5062bdf2c2bf1b46701280e5dc5ed6d1f7bd4e3e (patch)
tree71dea1966d70ae4fc7b31cccf3a492f6efc621f7 /library/cpp/http/server
parent2ab6bab688484680d3ebc5c4a7e9cd3ff04fda04 (diff)
downloadydb-5062bdf2c2bf1b46701280e5dc5ed6d1f7bd4e3e.tar.gz
Restoring authorship annotation for <zdm@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server')
-rw-r--r--library/cpp/http/server/http.cpp4
-rw-r--r--library/cpp/http/server/options.cpp26
-rw-r--r--library/cpp/http/server/options.h20
3 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp
index 128583bdd7..ae8a132789 100644
--- a/library/cpp/http/server/http.cpp
+++ b/library/cpp/http/server/http.cpp
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-using namespace NAddr;
-
+using namespace NAddr;
+
namespace {
class IPollAble {
public:
diff --git a/library/cpp/http/server/options.cpp b/library/cpp/http/server/options.cpp
index 05c954384a..ba7f720fe1 100644
--- a/library/cpp/http/server/options.cpp
+++ b/library/cpp/http/server/options.cpp
@@ -1,6 +1,6 @@
#include "options.h"
-#include <util/string/cast.h>
+#include <util/string/cast.h>
#include <util/digest/numeric.h>
#include <util/network/ip.h>
#include <util/network/socket.h>
@@ -8,32 +8,32 @@
#include <util/generic/yexception.h>
using TAddr = THttpServerOptions::TAddr;
-
+
static inline TString AddrToString(const TAddr& addr) {
- return addr.Addr + ":" + ToString(addr.Port);
-}
-
+ return addr.Addr + ":" + ToString(addr.Port);
+}
+
static inline TNetworkAddress ToNetworkAddr(const TString& address, ui16 port) {
if (address.empty() || address == TStringBuf("*")) {
- return TNetworkAddress(port);
+ return TNetworkAddress(port);
}
- return TNetworkAddress(address, port);
+ return TNetworkAddress(address, port);
}
void THttpServerOptions::BindAddresses(TBindAddresses& ret) const {
THashSet<TString> check;
for (auto addr : BindSockaddr) {
- if (!addr.Port) {
- addr.Port = Port;
+ if (!addr.Port) {
+ addr.Port = Port;
}
const TString straddr = AddrToString(addr);
-
- if (check.find(straddr) == check.end()) {
- check.insert(straddr);
- ret.push_back(ToNetworkAddr(addr.Addr, addr.Port));
+
+ if (check.find(straddr) == check.end()) {
+ check.insert(straddr);
+ ret.push_back(ToNetworkAddr(addr.Addr, addr.Port));
}
}
diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h
index 38eda0e5e7..03a8b6ed7c 100644
--- a/library/cpp/http/server/options.h
+++ b/library/cpp/http/server/options.h
@@ -2,7 +2,7 @@
#include <util/network/ip.h>
#include <util/network/init.h>
-#include <util/network/address.h>
+#include <util/network/address.h>
#include <util/generic/size_literals.h>
#include <util/generic/string.h>
#include <util/generic/vector.h>
@@ -19,15 +19,15 @@ public:
void BindAddresses(TBindAddresses& ret) const;
inline THttpServerOptions& AddBindAddress(const TString& address, ui16 port) {
- const TAddr addr = {
+ const TAddr addr = {
address,
port,
};
- BindSockaddr.push_back(addr);
+ BindSockaddr.push_back(addr);
return *this;
- }
-
+ }
+
inline THttpServerOptions& AddBindAddress(const TString& address) {
return AddBindAddress(address, 0);
}
@@ -139,13 +139,13 @@ public:
return *this;
}
- struct TAddr {
+ struct TAddr {
TString Addr;
- ui16 Port;
- };
-
+ ui16 Port;
+ };
+
typedef TVector<TAddr> TAddrs;
-
+
bool KeepAliveEnabled = true;
bool CompressionEnabled = false;
bool RejectExcessConnections = false;