summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibHTTP
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibHTTP')
-rw-r--r--Userland/Libraries/LibHTTP/HttpRequest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibHTTP/HttpRequest.cpp b/Userland/Libraries/LibHTTP/HttpRequest.cpp
index dc1928a104..fa43b6585e 100644
--- a/Userland/Libraries/LibHTTP/HttpRequest.cpp
+++ b/Userland/Libraries/LibHTTP/HttpRequest.cpp
@@ -175,7 +175,7 @@ Optional<HttpRequest> HttpRequest::from_raw_request(ReadonlyBytes raw_request)
break;
case State::InBody:
buffer.append(consume());
- if (index + 1 == raw_request.size()) {
+ if (index == raw_request.size()) {
// End of data, so store the body
auto maybe_body = ByteBuffer::copy(buffer);
// FIXME: Propagate this error somehow.