Mercurial > hg > orthanc
comparison OrthancFramework/Sources/FileStorage/StorageAccessor.cpp @ 5406:aaf7c49a9ddc am-http-compression
tentative to implement smart HTTP compression with detection of transfer syntax
author | Alain Mazy <am@osimis.io> |
---|---|
date | Sat, 04 Nov 2023 13:42:30 +0100 |
parents | b376abae664a |
children |
comparison
equal
deleted
inserted
replaced
5405:62bb63346185 | 5406:aaf7c49a9ddc |
---|---|
398 #if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 | 398 #if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 |
399 void StorageAccessor::AnswerFile(RestApiOutput& output, | 399 void StorageAccessor::AnswerFile(RestApiOutput& output, |
400 const FileInfo& info, | 400 const FileInfo& info, |
401 const std::string& mime) | 401 const std::string& mime) |
402 { | 402 { |
403 AnswerFile(output, info, mime, ContentCompression_Unknown); | |
404 } | |
405 | |
406 void StorageAccessor::AnswerFile(RestApiOutput& output, | |
407 const FileInfo& info, | |
408 const std::string& mime, | |
409 ContentCompression contentCompression) | |
410 { | |
403 BufferHttpSender sender; | 411 BufferHttpSender sender; |
404 SetupSender(sender, info, mime); | 412 SetupSender(sender, info, mime); |
405 | 413 |
406 HttpStreamTranscoder transcoder(sender, CompressionType_None); // since 1.11.2, the storage accessor only returns uncompressed buffers | 414 HttpStreamTranscoder transcoder(sender, CompressionType_None); // since 1.11.2, the storage accessor only returns uncompressed buffers |
407 output.AnswerStream(transcoder); | 415 output.AnswerStream(transcoder, contentCompression); |
408 } | 416 } |
409 #endif | 417 #endif |
410 } | 418 } |