Commit 7788a797 authored by hyperxor's avatar hyperxor

clang format

parent 0a3ee82c
......@@ -416,9 +416,9 @@ public:
ResponseWriter clone() const;
std::shared_ptr<Tcp::Peer> getPeer() const {
if (auto sp = peer_.lock())
return sp;
return nullptr;
if (auto sp = peer_.lock())
return sp;
return nullptr;
}
private:
......
......@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) {
if (available + alreadyAppendedChunkBytes < size + 2) {
cursor.advance(available);
message->body_.append(chunkData.rawText(), available);
alreadyAppendedChunkBytes +=available;
alreadyAppendedChunkBytes += available;
return Incomplete;
}
cursor.advance(size - alreadyAppendedChunkBytes);
//trailing EOL
// trailing EOL
cursor.advance(2);
message->body_.append(chunkData.rawText(), size - alreadyAppendedChunkBytes);
......@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data,
.then<std::function<Async::Promise<ssize_t>(ssize_t)>,
std::function<void(std::exception_ptr &)>>(
[=](int /*l*/) {
return Async::Promise<ssize_t>([=](
Async::Deferred<ssize_t> /*deferred*/) mutable { return; });
return Async::Promise<ssize_t>(
[=](Async::Deferred<ssize_t> /*deferred*/) mutable {
return;
});
},
[=](std::exception_ptr &eptr) {
......@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len,
}
auto state = parser->parse();
auto& request = parser->request;
auto &request = parser->request;
if (state == Private::State::Done) {
ResponseWriter response(transport(), request, this, peer);
......
......@@ -82,9 +82,7 @@ void Peer::setParser(std::shared_ptr<Http::RequestParser> parser) {
parser_ = parser;
}
std::shared_ptr<Http::RequestParser> Peer::getParser() const {
return parser_;
}
std::shared_ptr<Http::RequestParser> Peer::getParser() const { return parser_; }
Async::Promise<ssize_t> Peer::send(const RawBuffer &buffer, int flags) {
return transport()->asyncWrite(fd_, buffer, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment