Mercurial > hg > orthanc
diff Core/RestApi/RestApi.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 | 6968356679c0 |
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp Wed Jun 18 14:02:02 2014 +0200 +++ b/Core/RestApi/RestApi.cpp Wed Jun 18 15:22:13 2014 +0200 @@ -172,13 +172,6 @@ } } - bool RestApi::IsServedUri(const UriComponents& uri) - { - return (IsGetAccepted(uri) || - IsPutAccepted(uri) || - IsPostAccepted(uri) || - IsDeleteAccepted(uri)); - } bool RestApi::Handle(HttpOutput& output, HttpMethod method, @@ -187,6 +180,16 @@ const Arguments& getArguments, const std::string& postData) { + if (!IsGetAccepted(uri) && + !IsPutAccepted(uri) && + !IsPostAccepted(uri) && + !IsDeleteAccepted(uri)) + { + // This URI is not served by this handler + return false; + } + + bool ok = false; RestApiOutput restOutput(output); RestApiPath::Components components;