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
commitb91bcef7c99a119b0846479ef71bfab4beec72ca (patch)
treebe118d54d12a61bc4812ceb0a266a170a2fa3bc9 /library/cpp/http/io/stream.cpp
parentf421873774cf0b71743afbe5f6677861e66601ea (diff)
downloadydb-b91bcef7c99a119b0846479ef71bfab4beec72ca.tar.gz
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 1 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 6689be684f..cb3959db27 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();
}