Mercurial > hg > orthanc
changeset 7206:5d530a9b1088
fix FilesystemHttpSender.Basic
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Mon, 09 Nov 2026 10:16:27 +0100 |
| parents | 52a8e803e7d9 |
| children | 2a6c2e36d464 |
| files | OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp |
| diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Mon Nov 09 10:03:14 2026 +0100 +++ b/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Mon Nov 09 10:16:27 2026 +0100 @@ -91,8 +91,7 @@ file_.read(&chunk_[0], static_cast<std::streamsize>(chunk_.size())); - if (file_.fail() || - file_.bad() || // Presumably redundant with previous check + if (file_.bad() || file_.gcount() < 0) { throw OrthancException(ErrorCode_CorruptedFile);
