Mercurial > hg > orthanc
diff OrthancServer/ServerContext.cpp @ 1525:f9b0169eb6bb
testing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2015 17:50:38 +0200 |
parents | c388502a066d |
children | e9325f3ac496 |
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp Tue Aug 11 16:09:24 2015 +0200 +++ b/OrthancServer/ServerContext.cpp Tue Aug 11 17:50:38 2015 +0200 @@ -34,6 +34,7 @@ #include "ServerContext.h" #include "../Core/HttpServer/FilesystemHttpSender.h" +#include "../Core/HttpServer/HttpStreamTranscoder.h" #include "../Core/Logging.h" #include "FromDcmtkBridge.h" #include "ServerToolbox.h" @@ -318,16 +319,17 @@ std::auto_ptr<HttpFileSender> sender(accessor_.ConstructHttpFileSender(attachment.GetUuid(), attachment.GetContentType())); sender->SetContentType(GetMimeType(content)); - sender->SetContentFilename(instancePublicId + ".dcm"); // TODO ".dcm" => ToMimeType(content) + sender->SetContentFilename(attachment.GetUuid() + ".dcm"); // TODO ".dcm" => ToMimeType(content) output.AnswerStream(*sender); #else const FilesystemStorage& a = dynamic_cast<FilesystemStorage&>(accessor_.GetStorageArea()); FilesystemHttpSender sender(a, attachment.GetUuid()); - sender.SetSourceCompression(attachment.GetCompressionType()); sender.SetContentType(GetMimeType(content)); - sender.SetContentFilename(instancePublicId + ".dcm"); - output.AnswerStream(sender); + sender.SetContentFilename(attachment.GetUuid() + ".dcm"); + + HttpStreamTranscoder transcoder(sender, attachment.GetCompressionType()); + output.AnswerStream(transcoder); #endif }