diff options
author | vmordovin <vmordovin@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
commit | 6a1e535429145ec1ecfbc5f1efd3c95323261fb5 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/http/io/stream.cpp | |
parent | 7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (diff) | |
download | ydb-6a1e535429145ec1ecfbc5f1efd3c95323261fb5.tar.gz |
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/io/stream.cpp')
-rw-r--r-- | library/cpp/http/io/stream.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp index 2e4c6b3f2e..6689be684f 100644 --- a/library/cpp/http/io/stream.cpp +++ b/library/cpp/http/io/stream.cpp @@ -200,10 +200,10 @@ public: return ContentEncoded_; } - inline bool HasContent() const noexcept { - return HasContentLength_ || ChunkedInput_; - } - + inline bool HasContent() const noexcept { + return HasContentLength_ || ChunkedInput_; + } + inline bool HasExpect100Continue() const noexcept { return Expect100Continue_; } @@ -273,15 +273,15 @@ private: } } - inline bool IsRequest() const { + inline bool IsRequest() const { return strnicmp(FirstLine().data(), "get", 3) == 0 || strnicmp(FirstLine().data(), "post", 4) == 0 || strnicmp(FirstLine().data(), "put", 3) == 0 || strnicmp(FirstLine().data(), "patch", 5) == 0 || strnicmp(FirstLine().data(), "head", 4) == 0 || strnicmp(FirstLine().data(), "delete", 6) == 0; - } - + } + inline void BuildInputChain() { TParsedHeaders p; @@ -344,7 +344,7 @@ private: Buffered_.Reset(&Cnull); Input_ = Streams_.Add(new TMultiInput(&Buffered_, Slave_)); - if (IsRequest() || HasContentLength_) { + if (IsRequest() || HasContentLength_) { /* * TODO - we have other cases */ @@ -448,10 +448,10 @@ bool THttpInput::ContentEncoded() const noexcept { return Impl_->ContentEncoded(); } -bool THttpInput::HasContent() const noexcept { - return Impl_->HasContent(); -} - +bool THttpInput::HasContent() const noexcept { + return Impl_->HasContent(); +} + bool THttpInput::HasExpect100Continue() const noexcept { return Impl_->HasExpect100Continue(); } @@ -663,7 +663,7 @@ private: static inline size_t ParseHttpVersion(const TString& s) { if (s.empty()) { ythrow THttpParseException() << "malformed http stream"; - } + } size_t parsed_version = 0; @@ -804,7 +804,7 @@ private: return ret; } - + inline void RebuildStream() { bool keepAlive = false; const TCompressionCodecFactory::TEncoderConstructor* encoder = nullptr; |