diff options
| author | ivanmorozov <[email protected]> | 2022-02-10 16:47:33 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:33 +0300 | 
| commit | cba5d9a444e2cfe105f55ccda66cd21d50440017 (patch) | |
| tree | 79983e83d1a91aebeb1999338090eec69e24cc33 /library/cpp/http | |
| parent | eb540cc7a103419462d0cc870ca403966e2194c6 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http')
| -rw-r--r-- | library/cpp/http/misc/httpreqdata.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/http/misc/httpreqdata.h | 10 | ||||
| -rw-r--r-- | library/cpp/http/server/http.cpp | 14 | ||||
| -rw-r--r-- | library/cpp/http/server/http.h | 2 | 
4 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/http/misc/httpreqdata.cpp b/library/cpp/http/misc/httpreqdata.cpp index f6951f68cd9..204c4b7b632 100644 --- a/library/cpp/http/misc/httpreqdata.cpp +++ b/library/cpp/http/misc/httpreqdata.cpp @@ -65,9 +65,9 @@ const char* TBaseServerRequestData::RemoteAddr() const {  }  const char* TBaseServerRequestData::HeaderIn(TStringBuf key) const { -    auto it = HeadersIn_.find(key); +    auto it = HeadersIn_.find(key);  -    if (it == HeadersIn_.end()) { +    if (it == HeadersIn_.end()) {           return nullptr;      } @@ -108,7 +108,7 @@ const char* TBaseServerRequestData::Environment(const char* key) const {  }  void TBaseServerRequestData::Clear() { -    HeadersIn_.clear(); +    HeadersIn_.clear();       Addr = Path = Search = nullptr;      OrigSearch = {};      SearchLength = 0; @@ -180,7 +180,7 @@ bool TBaseServerRequestData::Parse(const char* origReq) {  }  void TBaseServerRequestData::AddHeader(const TString& name, const TString& value) { -    HeadersIn_[name] = value; +    HeadersIn_[name] = value;       if (stricmp(name.data(), "Host") == 0) {          size_t hostLen = strcspn(value.data(), ":"); @@ -192,5 +192,5 @@ void TBaseServerRequestData::AddHeader(const TString& name, const TString& value  void TBaseServerRequestData::SetPath(const TString& path) {      PathStorage = TBuffer(path.data(), path.size() + 1); -    Path = PathStorage.Data(); +    Path = PathStorage.Data();   } diff --git a/library/cpp/http/misc/httpreqdata.h b/library/cpp/http/misc/httpreqdata.h index 16e59c4d78c..7fd7745314f 100644 --- a/library/cpp/http/misc/httpreqdata.h +++ b/library/cpp/http/misc/httpreqdata.h @@ -61,11 +61,11 @@ public:      const char* HeaderIn(TStringBuf key) const;      const THttpHeadersContainer& HeadersIn() const { -        return HeadersIn_; -    } - +        return HeadersIn_;  +    }  +       inline size_t HeadersCount() const noexcept { -        return HeadersIn_.size(); +        return HeadersIn_.size();       }      TString HeaderByIndex(size_t n) const noexcept; @@ -87,7 +87,7 @@ public:      void AddHeader(const TString& name, const TString& value);  private: -    TBuffer PathStorage; +    TBuffer PathStorage;       mutable char* Addr;      TString Host;      TString Port; diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd70..61806602460 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -660,14 +660,14 @@ bool TClientRequest::CheckLoopback() {      return true;  } -void TClientRequest::ReleaseConnection() { +void TClientRequest::ReleaseConnection() {       if (Conn_ && HttpConn_ && HttpServ()->Options().KeepAliveEnabled && HttpConn_->CanBeKeepAlive() && (!HttpServ()->Options().RejectExcessConnections || !HttpServ()->MaxRequestsReached())) { -        Output().Finish(); -        Conn_->DeActivate(); +        Output().Finish();  +        Conn_->DeActivate();           Y_UNUSED(Conn_.Release()); -    } -} - +    }  +}  +   void TClientRequest::ResetConnection() {      if (HttpConn_) {          // send RST packet to client @@ -706,7 +706,7 @@ void TClientRequest::Process(void* ThreadSpecificResource) {          }          if (Reply(ThreadSpecificResource)) { -            ReleaseConnection(); +            ReleaseConnection();               /*               * *this will be destroyed... diff --git a/library/cpp/http/server/http.h b/library/cpp/http/server/http.h index b292d38f270..e9e9c71c151 100644 --- a/library/cpp/http/server/http.h +++ b/library/cpp/http/server/http.h @@ -126,7 +126,7 @@ public:      bool CheckLoopback();      void ProcessFailRequest(int failstate); -    void ReleaseConnection(); +    void ReleaseConnection();       void ResetConnection();  | 
