Fix wrong behavior when reading text

Also add another 'file read error' status.

Closes #19254.
PR #19262.
This commit is contained in:
Chocobo1 2023-07-02 13:23:20 +08:00 committed by GitHub
commit 80791e328d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 11 deletions

View file

@ -516,6 +516,7 @@ void WebApplication::sendFile(const Path &path)
LogMsg(message, Log::WARNING);
throw InternalServerErrorHTTPError(readResult.error().message);
case Utils::IO::ReadError::Failed:
case Utils::IO::ReadError::SizeMismatch:
LogMsg(message, Log::WARNING);
throw InternalServerErrorHTTPError(readResult.error().message);