aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/io/stream.cpp
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commit2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/http/io/stream.cpp
parentb91bcef7c99a119b0846479ef71bfab4beec72ca (diff)
downloadydb-2a4a975b112fa0fa138abc7457fe67e0e1e7fd02.tar.gz
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/io/stream.cpp')
-rw-r--r--library/cpp/http/io/stream.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp
index cb3959db27..6689be684f 100644
--- a/library/cpp/http/io/stream.cpp
+++ b/library/cpp/http/io/stream.cpp
@@ -176,10 +176,10 @@ public:
return Headers_;
}
- inline const TMaybe<THttpHeaders>& Trailers() const noexcept {
- return Trailers_;
- }
-
+ inline const TMaybe<THttpHeaders>& Trailers() const noexcept {
+ return Trailers_;
+ }
+
inline bool IsKeepAlive() const noexcept {
return KeepAlive_;
}
@@ -212,16 +212,16 @@ private:
template <class Operation>
inline size_t Perform(size_t len, const Operation& operation) {
size_t processed = operation(len);
- if (processed == 0 && len > 0) {
- if (!ChunkedInput_) {
- Trailers_.ConstructInPlace();
- } else {
- // Read the header of the trailing chunk. It remains in
- // the TChunkedInput stream if the HTTP response is compressed.
- char symbol;
- if (ChunkedInput_->Read(&symbol, 1) != 0) {
- ythrow THttpParseException() << "some data remaining in TChunkedInput";
- }
+ if (processed == 0 && len > 0) {
+ if (!ChunkedInput_) {
+ Trailers_.ConstructInPlace();
+ } else {
+ // Read the header of the trailing chunk. It remains in
+ // the TChunkedInput stream if the HTTP response is compressed.
+ char symbol;
+ if (ChunkedInput_->Read(&symbol, 1) != 0) {
+ ythrow THttpParseException() << "some data remaining in TChunkedInput";
+ }
}
}
return processed;
@@ -337,10 +337,10 @@ private:
}
if (p.Chunked) {
- ChunkedInput_ = Streams_.Add(new TChunkedInput(&Buffered_, &Trailers_));
- Input_ = ChunkedInput_;
+ ChunkedInput_ = Streams_.Add(new TChunkedInput(&Buffered_, &Trailers_));
+ Input_ = ChunkedInput_;
} else {
- // disable buffering
+ // disable buffering
Buffered_.Reset(&Cnull);
Input_ = Streams_.Add(new TMultiInput(&Buffered_, Slave_));
@@ -377,7 +377,7 @@ private:
TString FirstLine_;
THttpHeaders Headers_;
- TMaybe<THttpHeaders> Trailers_;
+ TMaybe<THttpHeaders> Trailers_;
bool KeepAlive_;
TAcceptCodings Codings_;
@@ -411,10 +411,10 @@ const THttpHeaders& THttpInput::Headers() const noexcept {
return Impl_->Headers();
}
-const TMaybe<THttpHeaders>& THttpInput::Trailers() const noexcept {
- return Impl_->Trailers();
-}
-
+const TMaybe<THttpHeaders>& THttpInput::Trailers() const noexcept {
+ return Impl_->Trailers();
+}
+
const TString& THttpInput::FirstLine() const noexcept {
return Impl_->FirstLine();
}