mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
LibHTTP: Avoid implicitly copying ByteBuffer
This commit is contained in:
parent
d78365f785
commit
f59f7674c8
5 changed files with 10 additions and 10 deletions
|
@ -40,7 +40,7 @@ static Optional<ByteBuffer> handle_content_encoding(const ByteBuffer& buf, const
|
|||
dbgln(" Output size: {}", uncompressed.value().size());
|
||||
}
|
||||
|
||||
return uncompressed.value();
|
||||
return uncompressed.release_value();
|
||||
} else if (content_encoding == "deflate") {
|
||||
dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: buf is deflate compressed!");
|
||||
|
||||
|
@ -66,15 +66,15 @@ static Optional<ByteBuffer> handle_content_encoding(const ByteBuffer& buf, const
|
|||
dbgln(" Output size: {}", uncompressed.value().size());
|
||||
}
|
||||
|
||||
return uncompressed.value();
|
||||
return uncompressed.release_value();
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Job::Job(const HttpRequest& request, OutputStream& output_stream)
|
||||
Job::Job(HttpRequest&& request, OutputStream& output_stream)
|
||||
: Core::NetworkJob(output_stream)
|
||||
, m_request(request)
|
||||
, m_request(move(request))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue