Mercurial > hg > orthanc
comparison Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 50:a15e90e5d6fc
rename in code
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Sep 2012 15:50:12 +0200 |
parents | 9be852ad33d2 |
children | c996319e90bc |
comparison
equal
deleted
inserted
replaced
49:e1a3ae0dadf3 | 50:a15e90e5d6fc |
---|---|
1 /** | 1 /** |
2 * Palantir - A Lightweight, RESTful DICOM Store | 2 * Palanthir - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege, | 3 * Copyright (C) 2012 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 |
18 **/ | 18 **/ |
19 | 19 |
20 | 20 |
21 #include "EmbeddedResourceHttpHandler.h" | 21 #include "EmbeddedResourceHttpHandler.h" |
22 | 22 |
23 #include "../PalantirException.h" | 23 #include "../PalanthirException.h" |
24 | 24 |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 | 26 |
27 | 27 |
28 namespace Palantir | 28 namespace Palanthir |
29 { | 29 { |
30 EmbeddedResourceHttpHandler::EmbeddedResourceHttpHandler( | 30 EmbeddedResourceHttpHandler::EmbeddedResourceHttpHandler( |
31 const std::string& baseUri, | 31 const std::string& baseUri, |
32 EmbeddedResources::DirectoryResourceId resourceId) | 32 EmbeddedResources::DirectoryResourceId resourceId) |
33 { | 33 { |
63 { | 63 { |
64 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); | 64 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); |
65 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); | 65 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); |
66 output.AnswerBufferWithContentType(buffer, size, contentType); | 66 output.AnswerBufferWithContentType(buffer, size, contentType); |
67 } | 67 } |
68 catch (PalantirException& e) | 68 catch (PalanthirException& e) |
69 { | 69 { |
70 output.SendHeader(Palantir_HttpStatus_404_NotFound); | 70 output.SendHeader(Palanthir_HttpStatus_404_NotFound); |
71 } | 71 } |
72 } | 72 } |
73 } | 73 } |