Mercurial > hg > orthanc
diff Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 901:7d88f3f4a3b3 plugins
refactoring IsServedUri, answer PNG images, regular expression groups
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Jun 2014 15:22:13 +0200 |
parents | 7e8cde5905fd |
children | 8d1845feb277 |
line wrap: on
line diff
--- a/Core/HttpServer/EmbeddedResourceHttpHandler.cpp Wed Jun 18 14:02:02 2014 +0200 +++ b/Core/HttpServer/EmbeddedResourceHttpHandler.cpp Wed Jun 18 15:22:13 2014 +0200 @@ -51,12 +51,6 @@ } - bool EmbeddedResourceHttpHandler::IsServedUri(const UriComponents& uri) - { - return Toolbox::IsChildUri(baseUri_, uri); - } - - bool EmbeddedResourceHttpHandler::Handle( HttpOutput& output, HttpMethod method, @@ -65,6 +59,12 @@ const Arguments& arguments, const std::string&) { + if (!Toolbox::IsChildUri(baseUri_, uri)) + { + // This URI is not served by this handler + return false; + } + if (method != HttpMethod_Get) { output.SendMethodNotAllowedError("GET");