Skip to content

Commit

Permalink
fcgi/Client: use "break" instead of returning MORE
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jan 13, 2025
1 parent 40576d2 commit 5935002
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/fcgi/Client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ FcgiClient::ConsumeInput(std::span<const std::byte> src) noexcept
/* incomplete header line received, want more
data */
assert(response.receiving_headers);
return BufferedResult::MORE;
break;
}

/* the response body handler blocks, wait for it to
Expand All @@ -704,12 +704,14 @@ FcgiClient::ConsumeInput(std::span<const std::byte> src) noexcept
: BufferedResult::DESTROYED;
}

if (content_length > 0)
return src.empty() || response.receiving_headers
if (content_length > 0) {
if (src.empty() || response.receiving_headers)
/* all input was consumed, want more */
? BufferedResult::MORE
/* some was consumed, try again later */
: BufferedResult::OK;
break;

/* some was consumed, try again later */
return BufferedResult::OK;
}

continue;
}
Expand Down

0 comments on commit 5935002

Please sign in to comment.