aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/misc/httpreqdata.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/http/misc/httpreqdata.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/misc/httpreqdata.h')
-rw-r--r--library/cpp/http/misc/httpreqdata.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/library/cpp/http/misc/httpreqdata.h b/library/cpp/http/misc/httpreqdata.h
index 16e59c4d78..946a0e5f14 100644
--- a/library/cpp/http/misc/httpreqdata.h
+++ b/library/cpp/http/misc/httpreqdata.h
@@ -1,14 +1,14 @@
#pragma once
#include <library/cpp/digest/lower_case/hash_ops.h>
-
-#include <util/str_stl.h>
-
+
+#include <util/str_stl.h>
+
#include <util/system/defaults.h>
-#include <util/string/cast.h>
+#include <util/string/cast.h>
#include <library/cpp/cgiparam/cgiparam.h>
#include <util/network/address.h>
-#include <util/network/socket.h>
+#include <util/network/socket.h>
#include <util/generic/hash.h>
#include <util/system/yassert.h>
#include <util/generic/string.h>
@@ -21,16 +21,16 @@ class TBaseServerRequestData {
public:
TBaseServerRequestData(SOCKET s = INVALID_SOCKET);
TBaseServerRequestData(const char* qs, SOCKET s = INVALID_SOCKET);
-
+
void SetHost(const TString& host, ui16 port) {
Host = host;
Port = ToString(port);
}
-
+
const TString& ServerName() const {
return Host;
}
-
+
NAddr::IRemoteAddrPtr ServerAddress() const {
return NAddr::GetSockAddr(Socket);
}
@@ -38,57 +38,57 @@ public:
const TString& ServerPort() const {
return Port;
}
-
+
const char* ScriptName() const {
return Path;
}
-
+
const char* QueryString() const {
return Search;
}
-
+
TStringBuf QueryStringBuf() const {
return TStringBuf(Search, SearchLength);
}
-
+
TStringBuf OrigQueryStringBuf() const {
return OrigSearch;
}
- void AppendQueryString(const char* str, size_t length);
- const char* RemoteAddr() const;
+ void AppendQueryString(const char* str, size_t length);
+ const char* RemoteAddr() const;
void SetRemoteAddr(TStringBuf addr);
const char* HeaderIn(TStringBuf key) const;
-
+
const THttpHeadersContainer& HeadersIn() const {
return HeadersIn_;
}
inline size_t HeadersCount() const noexcept {
return HeadersIn_.size();
- }
-
+ }
+
TString HeaderByIndex(size_t n) const noexcept;
- const char* Environment(const char* key) const;
-
- void Clear();
-
+ const char* Environment(const char* key) const;
+
+ void Clear();
+
void SetSocket(SOCKET s) noexcept {
- Socket = s;
- }
-
+ Socket = s;
+ }
+
ui64 RequestBeginTime() const noexcept {
- return BeginTime;
- }
-
+ return BeginTime;
+ }
+
void SetPath(const TString& path);
const char* GetCurPage() const;
bool Parse(const char* req);
void AddHeader(const TString& name, const TString& value);
-
+
private:
TBuffer PathStorage;
- mutable char* Addr;
+ mutable char* Addr;
TString Host;
TString Port;
char* Path;
@@ -98,13 +98,13 @@ private:
THttpHeadersContainer HeadersIn_;
mutable char AddrData[INET6_ADDRSTRLEN];
SOCKET Socket;
- ui64 BeginTime;
+ ui64 BeginTime;
mutable TString CurPage;
TBuffer ParseBuf;
TBuffer ModifiedQueryString;
};
-
-class TServerRequestData: public TBaseServerRequestData {
+
+class TServerRequestData: public TBaseServerRequestData {
public:
TServerRequestData(SOCKET s = INVALID_SOCKET)
: TBaseServerRequestData(s)
@@ -119,7 +119,7 @@ public:
void Scan() {
CgiParam.Scan(QueryStringBuf());
}
-
+
public:
- TCgiParameters CgiParam;
+ TCgiParameters CgiParam;
};