Commit 7788a797 authored by hyperxor's avatar hyperxor

clang format

parent 0a3ee82c
...@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) { ...@@ -423,12 +423,12 @@ BodyStep::Chunk::Result BodyStep::Chunk::parse(StreamCursor &cursor) {
if (available + alreadyAppendedChunkBytes < size + 2) { if (available + alreadyAppendedChunkBytes < size + 2) {
cursor.advance(available); cursor.advance(available);
message->body_.append(chunkData.rawText(), available); message->body_.append(chunkData.rawText(), available);
alreadyAppendedChunkBytes +=available; alreadyAppendedChunkBytes += available;
return Incomplete; return Incomplete;
} }
cursor.advance(size - alreadyAppendedChunkBytes); cursor.advance(size - alreadyAppendedChunkBytes);
//trailing EOL // trailing EOL
cursor.advance(2); cursor.advance(2);
message->body_.append(chunkData.rawText(), size - alreadyAppendedChunkBytes); message->body_.append(chunkData.rawText(), size - alreadyAppendedChunkBytes);
...@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data, ...@@ -798,8 +798,10 @@ Async::Promise<ssize_t> ResponseWriter::putOnWire(const char *data,
.then<std::function<Async::Promise<ssize_t>(ssize_t)>, .then<std::function<Async::Promise<ssize_t>(ssize_t)>,
std::function<void(std::exception_ptr &)>>( std::function<void(std::exception_ptr &)>>(
[=](int /*l*/) { [=](int /*l*/) {
return Async::Promise<ssize_t>([=]( return Async::Promise<ssize_t>(
Async::Deferred<ssize_t> /*deferred*/) mutable { return; }); [=](Async::Deferred<ssize_t> /*deferred*/) mutable {
return;
});
}, },
[=](std::exception_ptr &eptr) { [=](std::exception_ptr &eptr) {
...@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len, ...@@ -922,7 +924,7 @@ void Handler::onInput(const char *buffer, size_t len,
} }
auto state = parser->parse(); auto state = parser->parse();
auto& request = parser->request; auto &request = parser->request;
if (state == Private::State::Done) { if (state == Private::State::Done) {
ResponseWriter response(transport(), request, this, peer); ResponseWriter response(transport(), request, this, peer);
......
...@@ -82,9 +82,7 @@ void Peer::setParser(std::shared_ptr<Http::RequestParser> parser) { ...@@ -82,9 +82,7 @@ void Peer::setParser(std::shared_ptr<Http::RequestParser> parser) {
parser_ = parser; parser_ = parser;
} }
std::shared_ptr<Http::RequestParser> Peer::getParser() const { std::shared_ptr<Http::RequestParser> Peer::getParser() const { return parser_; }
return parser_;
}
Async::Promise<ssize_t> Peer::send(const RawBuffer &buffer, int flags) { Async::Promise<ssize_t> Peer::send(const RawBuffer &buffer, int flags) {
return transport()->asyncWrite(fd_, buffer, 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