diff OrthancServer/ParsedDicomFile.cpp @ 1113:ba5c0908600c

Refactoring of HttpOutput ("Content-Length" header is now always sent)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Sep 2014 15:51:20 +0200
parents a66224eec125
children 80671157d051
line wrap: on
line diff
--- a/OrthancServer/ParsedDicomFile.cpp	Mon Sep 01 12:20:26 2014 +0200
+++ b/OrthancServer/ParsedDicomFile.cpp	Tue Sep 02 15:51:20 2014 +0200
@@ -264,7 +264,8 @@
     Uint32 length = element.getLength(transferSyntax);
     Uint32 offset = 0;
 
-    output.GetLowLevelOutput().SendOkHeader(CONTENT_TYPE_OCTET_STREAM, true, length, NULL);
+    output.GetLowLevelOutput().SetContentType(CONTENT_TYPE_OCTET_STREAM);
+    output.GetLowLevelOutput().SetContentLength(length);
 
     while (offset < length)
     {
@@ -282,7 +283,7 @@
 
       if (cond.good())
       {
-        output.GetLowLevelOutput().SendBodyData(&buffer[0], nbytes);
+        output.GetLowLevelOutput().SendBody(&buffer[0], nbytes);
         offset += nbytes;
       }
       else