changeset 3161:5cf29046c159

removed misleading warning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Jan 2019 16:16:56 +0100
parents fc9a4a2dad63
children 94a4f75cc746
files Core/HttpServer/FilesystemHttpSender.h OrthancServer/OrthancRestApi/OrthancRestArchive.cpp
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/FilesystemHttpSender.h	Thu Jan 24 10:55:19 2019 +0100
+++ b/Core/HttpServer/FilesystemHttpSender.h	Thu Jan 24 16:16:56 2019 +0100
@@ -61,6 +61,13 @@
       Initialize(path);
     }
 
+    FilesystemHttpSender(const std::string& path,
+                         MimeType contentType)
+    {
+      SetContentType(contentType);
+      Initialize(path);
+    }
+
     FilesystemHttpSender(const FilesystemStorage& storage,
                          const std::string& uuid)
     {
--- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp	Thu Jan 24 10:55:19 2019 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp	Thu Jan 24 16:16:56 2019 +0100
@@ -144,8 +144,7 @@
           (publicContent, job.release(), priority))
       {
         // The archive is now created: Prepare the sending of the ZIP file
-        FilesystemHttpSender sender(tmp->GetPath());
-        sender.SetContentType(MimeType_Gzip);
+        FilesystemHttpSender sender(tmp->GetPath(), MimeType_Zip);
         sender.SetContentFilename(filename);
 
         // Send the ZIP