summaryrefslogtreecommitdiff
path: root/Userland/Services/ProtocolServer/HttpCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/ProtocolServer/HttpCommon.h')
-rw-r--r--Userland/Services/ProtocolServer/HttpCommon.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Services/ProtocolServer/HttpCommon.h b/Userland/Services/ProtocolServer/HttpCommon.h
index 455af38d59..c42bd1471e 100644
--- a/Userland/Services/ProtocolServer/HttpCommon.h
+++ b/Userland/Services/ProtocolServer/HttpCommon.h
@@ -42,14 +42,14 @@ namespace ProtocolServer::Detail {
template<typename TSelf, typename TJob>
void init(TSelf* self, TJob job)
{
- job->on_headers_received = [&](auto& headers, auto response_code) {
+ job->on_headers_received = [self](auto& headers, auto response_code) {
if (response_code.has_value())
self->set_status_code(response_code.value());
self->set_response_headers(headers);
};
- job->on_finish = [&](bool success) {
- if (auto* response = job->response()) {
+ job->on_finish = [self](bool success) {
+ if (auto* response = self->job().response()) {
self->set_status_code(response->code());
self->set_response_headers(response->headers());
self->set_downloaded_size(self->output_stream().size());
@@ -62,11 +62,11 @@ void init(TSelf* self, TJob job)
self->did_finish(success);
};
- job->on_progress = [&](Optional<u32> total, u32 current) {
+ job->on_progress = [self](Optional<u32> total, u32 current) {
self->did_progress(total, current);
};
if constexpr (requires { job->on_certificate_requested; }) {
- job->on_certificate_requested = [&](auto&) {
+ job->on_certificate_requested = [self](auto&) {
self->did_request_certificates();
};
}