aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/response.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/http/server/response.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/response.cpp')
-rw-r--r--library/cpp/http/server/response.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/http/server/response.cpp b/library/cpp/http/server/response.cpp
index 52d64c91ce..cbdb29aab7 100644
--- a/library/cpp/http/server/response.cpp
+++ b/library/cpp/http/server/response.cpp
@@ -17,7 +17,7 @@ THttpResponse& THttpResponse::SetContentType(const TStringBuf& contentType) {
return *this;
}
-void THttpResponse::OutTo(IOutputStream& os) const {
+void THttpResponse::OutTo(IOutputStream& os) const {
TVector<IOutputStream::TPart> parts;
const size_t FIRST_LINE_PARTS = 3;
const size_t HEADERS_PARTS = Headers.Count() * 4;
@@ -26,15 +26,15 @@ void THttpResponse::OutTo(IOutputStream& os) const {
// first line
parts.push_back(IOutputStream::TPart(TStringBuf("HTTP/1.1 ")));
- parts.push_back(IOutputStream::TPart(HttpCodeStrEx(Code)));
- parts.push_back(IOutputStream::TPart::CrLf());
+ parts.push_back(IOutputStream::TPart(HttpCodeStrEx(Code)));
+ parts.push_back(IOutputStream::TPart::CrLf());
// headers
for (THttpHeaders::TConstIterator i = Headers.Begin(); i != Headers.End(); ++i) {
- parts.push_back(IOutputStream::TPart(i->Name()));
+ parts.push_back(IOutputStream::TPart(i->Name()));
parts.push_back(IOutputStream::TPart(TStringBuf(": ")));
- parts.push_back(IOutputStream::TPart(i->Value()));
- parts.push_back(IOutputStream::TPart::CrLf());
+ parts.push_back(IOutputStream::TPart(i->Value()));
+ parts.push_back(IOutputStream::TPart::CrLf());
}
char buf[50];
@@ -45,21 +45,21 @@ void THttpResponse::OutTo(IOutputStream& os) const {
mo << Content.size();
parts.push_back(IOutputStream::TPart(TStringBuf("Content-Length: ")));
- parts.push_back(IOutputStream::TPart(buf, mo.Buf() - buf));
- parts.push_back(IOutputStream::TPart::CrLf());
+ parts.push_back(IOutputStream::TPart(buf, mo.Buf() - buf));
+ parts.push_back(IOutputStream::TPart::CrLf());
}
// content
- parts.push_back(IOutputStream::TPart::CrLf());
+ parts.push_back(IOutputStream::TPart::CrLf());
if (!Content.empty()) {
- parts.push_back(IOutputStream::TPart(Content));
+ parts.push_back(IOutputStream::TPart(Content));
}
os.Write(parts.data(), parts.size());
}
template <>
-void Out<THttpResponse>(IOutputStream& os, const THttpResponse& resp) {
+void Out<THttpResponse>(IOutputStream& os, const THttpResponse& resp) {
resp.OutTo(os);
}