Mercurial > hg > orthanc
diff Core/HttpServer/FilesystemHttpHandler.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 | e078ea944089 |
line wrap: on
line diff
--- a/Core/HttpServer/FilesystemHttpHandler.cpp Wed Jun 18 14:02:02 2014 +0200 +++ b/Core/HttpServer/FilesystemHttpHandler.cpp Wed Jun 18 15:22:13 2014 +0200 @@ -120,12 +120,6 @@ } - bool FilesystemHttpHandler::IsServedUri(const UriComponents& uri) - { - return Toolbox::IsChildUri(pimpl_->baseUri_, uri); - } - - bool FilesystemHttpHandler::Handle( HttpOutput& output, HttpMethod method, @@ -134,6 +128,12 @@ const Arguments& arguments, const std::string&) { + if (!Toolbox::IsChildUri(pimpl_->baseUri_, uri)) + { + // This URI is not served by this handler + return false; + } + if (method != HttpMethod_Get) { output.SendMethodNotAllowedError("GET");