summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2023-03-23 02:52:06 +0300
committerAndreas Kling <kling@serenityos.org>2023-03-26 17:56:17 +0200
commit9220cdc285db3ac68cdef58d8beb15a0171c54c9 (patch)
treecd19895d6fdd1b0f20bcc0be28b66009186e0ecc /Userland/Services
parent5b31d1208f7d0622a8fd57024568368286bf8372 (diff)
downloadserenity-9220cdc285db3ac68cdef58d8beb15a0171c54c9.zip
LibHTTP+WebDriver+WebServer: Return error from HTTP request parser
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WebServer/Client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp
index c91d8a0b40..f6cc8a408d 100644
--- a/Userland/Services/WebServer/Client.cpp
+++ b/Userland/Services/WebServer/Client.cpp
@@ -97,7 +97,7 @@ void Client::start()
ErrorOr<bool> Client::handle_request(ReadonlyBytes raw_request)
{
auto request_or_error = HTTP::HttpRequest::from_raw_request(raw_request);
- if (!request_or_error.has_value())
+ if (request_or_error.is_error())
return false;
auto& request = request_or_error.value();
auto resource_decoded = URL::percent_decode(request.resource());