changeset 1520:4a503a8c7749

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 13:26:42 +0200
parents 8bd0d897763f
children 3606278d305e
files Core/HttpServer/BufferHttpSender.cpp OrthancServer/ParsedDicomFile.cpp
diffstat 2 files changed, 4 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- 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();
   }
 }
--- 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_)
         {