comparison Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 759:8cfc6119a5bd dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:04:55 +0200
parents 2d0a347e8cfc
children a811bdf8b8eb
comparison
equal deleted inserted replaced
605:b82292ba2083 759:8cfc6119a5bd
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the 8 * published by the Free Software Foundation, either version 3 of the
77 { 77 {
78 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); 78 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str());
79 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); 79 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str());
80 output.AnswerBufferWithContentType(buffer, size, contentType); 80 output.AnswerBufferWithContentType(buffer, size, contentType);
81 } 81 }
82 catch (OrthancException& e) 82 catch (OrthancException&)
83 { 83 {
84 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; 84 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath;
85 output.SendHeader(HttpStatus_404_NotFound); 85 output.SendHeader(HttpStatus_404_NotFound);
86 } 86 }
87 } 87 }