Mercurial > hg > orthanc
comparison Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 473:c9a5d72f8481
changing the namespace of HTTP enumerations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jul 2013 17:22:13 +0200 |
parents | bdd72233b105 |
children | b8f738685ad2 |
comparison
equal
deleted
inserted
replaced
472:722b56b99093 | 473:c9a5d72f8481 |
---|---|
56 } | 56 } |
57 | 57 |
58 | 58 |
59 void EmbeddedResourceHttpHandler::Handle( | 59 void EmbeddedResourceHttpHandler::Handle( |
60 HttpOutput& output, | 60 HttpOutput& output, |
61 Orthanc_HttpMethod method, | 61 HttpMethod method, |
62 const UriComponents& uri, | 62 const UriComponents& uri, |
63 const Arguments& headers, | 63 const Arguments& headers, |
64 const Arguments& arguments, | 64 const Arguments& arguments, |
65 const std::string&) | 65 const std::string&) |
66 { | 66 { |
67 if (method != Orthanc_HttpMethod_Get) | 67 if (method != HttpMethod_Get) |
68 { | 68 { |
69 output.SendMethodNotAllowedError("GET"); | 69 output.SendMethodNotAllowedError("GET"); |
70 return; | 70 return; |
71 } | 71 } |
72 | 72 |
80 output.AnswerBufferWithContentType(buffer, size, contentType); | 80 output.AnswerBufferWithContentType(buffer, size, contentType); |
81 } | 81 } |
82 catch (OrthancException& e) | 82 catch (OrthancException& e) |
83 { | 83 { |
84 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; | 84 LOG(WARNING) << "Unable to find HTTP resource: " << resourcePath; |
85 output.SendHeader(Orthanc_HttpStatus_404_NotFound); | 85 output.SendHeader(HttpStatus_404_NotFound); |
86 } | 86 } |
87 } | 87 } |
88 } | 88 } |