comparison Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 1517:4f8c8ef114db

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 10:32:34 +0200
parents c94353fbd4e9
children 3606278d305e
comparison
equal deleted inserted replaced
1516:f09f5d3225a7 1517:4f8c8ef114db
79 { 79 {
80 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); 80 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str());
81 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); 81 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str());
82 82
83 output.SetContentType(contentType.c_str()); 83 output.SetContentType(contentType.c_str());
84 output.SendBody(buffer, size, IHttpHandler::GetPreferredCompression(headers, size)); 84 output.SendBody(buffer, size);
85 } 85 }
86 catch (OrthancException&) 86 catch (OrthancException&)
87 { 87 {
88 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; 88 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath;
89 output.SendStatus(HttpStatus_404_NotFound); 89 output.SendStatus(HttpStatus_404_NotFound);