# HG changeset patch # User Sebastien Jodogne # Date 1439292402 -7200 # Node ID 4a503a8c7749004548e02460f2d46cf0b292fed2 # Parent 8bd0d897763fead8f2230d65e8ed44825e07b8f4 fix diff -r 8bd0d897763f -r 4a503a8c7749 Core/HttpServer/BufferHttpSender.cpp --- a/Core/HttpServer/BufferHttpSender.cpp Tue Aug 11 13:15:16 2015 +0200 +++ b/Core/HttpServer/BufferHttpSender.cpp Tue Aug 11 13:26:42 2015 +0200 @@ -44,32 +44,18 @@ } else { - done_ = false; + done_ = true; return true; } } const char* BufferHttpSender::GetChunkContent() { - if (done_) - { - throw OrthancException(ErrorCode_InternalError); - } - else - { - return buffer_.c_str(); - } + return buffer_.c_str(); } size_t BufferHttpSender::GetChunkSize() { - if (done_) - { - throw OrthancException(ErrorCode_InternalError); - } - else - { - return buffer_.size(); - } + return buffer_.size(); } } diff -r 8bd0d897763f -r 4a503a8c7749 OrthancServer/ParsedDicomFile.cpp --- a/OrthancServer/ParsedDicomFile.cpp Tue Aug 11 13:15:16 2015 +0200 +++ b/OrthancServer/ParsedDicomFile.cpp Tue Aug 11 13:26:42 2015 +0200 @@ -301,7 +301,7 @@ virtual bool ReadNextChunk() { - assert(offset_ < length_); + assert(offset_ <= length_); if (offset_ == length_) {