diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | 863a59a65247c24db7cb06789bc5cf79d04da32f (patch) | |
tree | 139dc000c8cd4a40f5659e421b7c75135d080307 /library/cpp/http/io/stream.cpp | |
parent | f64e95a9eb9ab03240599eb9581c5a9102426a96 (diff) | |
download | ydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/io/stream.cpp')
-rw-r--r-- | library/cpp/http/io/stream.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp index 6689be684f..ebbe460e42 100644 --- a/library/cpp/http/io/stream.cpp +++ b/library/cpp/http/io/stream.cpp @@ -161,11 +161,11 @@ public: } inline size_t Read(void* buf, size_t len) { - return Perform(len, [this, buf](size_t toRead) { return Input_->Read(buf, toRead); }); + return Perform(len, [this, buf](size_t toRead) { return Input_->Read(buf, toRead); }); } - - inline size_t Skip(size_t len) { - return Perform(len, [this](size_t toSkip) { return Input_->Skip(toSkip); }); + + inline size_t Skip(size_t len) { + return Perform(len, [this](size_t toSkip) { return Input_->Skip(toSkip); }); } inline const TString& FirstLine() const noexcept { @@ -210,8 +210,8 @@ public: private: template <class Operation> - inline size_t Perform(size_t len, const Operation& operation) { - size_t processed = operation(len); + inline size_t Perform(size_t len, const Operation& operation) { + size_t processed = operation(len); if (processed == 0 && len > 0) { if (!ChunkedInput_) { Trailers_.ConstructInPlace(); @@ -222,11 +222,11 @@ private: if (ChunkedInput_->Read(&symbol, 1) != 0) { ythrow THttpParseException() << "some data remaining in TChunkedInput"; } - } - } - return processed; - } - + } + } + return processed; + } + struct TParsedHeaders { bool Chunked = false; bool KeepAlive = false; @@ -403,10 +403,10 @@ size_t THttpInput::DoRead(void* buf, size_t len) { return Impl_->Read(buf, len); } -size_t THttpInput::DoSkip(size_t len) { - return Impl_->Skip(len); -} - +size_t THttpInput::DoSkip(size_t len) { + return Impl_->Skip(len); +} + const THttpHeaders& THttpInput::Headers() const noexcept { return Impl_->Headers(); } |