Mercurial > hg > orthanc
comparison OrthancServer/Sources/EmbeddedResourceHttpHandler.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 | 0ea402b4d901 |
children |
comparison
equal
deleted
inserted
replaced
5405:62bb63346185 | 5406:aaf7c49a9ddc |
---|---|
71 { | 71 { |
72 const void* buffer = ServerResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); | 72 const void* buffer = ServerResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); |
73 size_t size = ServerResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); | 73 size_t size = ServerResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); |
74 | 74 |
75 output.SetContentType(contentType); | 75 output.SetContentType(contentType); |
76 output.SetContentCompression(SystemToolbox::GuessContentCompression(contentType)); | |
76 output.Answer(buffer, size); | 77 output.Answer(buffer, size); |
77 } | 78 } |
78 catch (OrthancException&) | 79 catch (OrthancException&) |
79 { | 80 { |
80 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; | 81 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; |