Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPlugins.cpp @ 1329:272cb2019a4c
fix recovery tool
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Mar 2015 16:51:31 +0100 |
parents | b7351ecb79b4 |
children | 7227b096a6dc |
comparison
equal
deleted
inserted
replaced
1328:b7351ecb79b4 | 1329:272cb2019a4c |
---|---|
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 bool OrthancPlugins::Handle(HttpOutput& output, | 306 bool OrthancPlugins::Handle(HttpOutput& output, |
307 HttpMethod method, | 307 HttpMethod method, |
308 const UriComponents& uri, | 308 const UriComponents& uri, |
309 const Arguments& headers, | 309 const Arguments& headers, |
310 const Arguments& getArguments, | 310 const Arguments& getArguments, |
311 const std::string& postData) | 311 const std::string& postData) |
312 { | 312 { |
313 std::string flatUri = Toolbox::FlattenUri(uri); | 313 std::string flatUri = Toolbox::FlattenUri(uri); |
314 OrthancPluginRestCallback callback = NULL; | 314 OrthancPluginRestCallback callback = NULL; |
315 | 315 |
316 std::vector<std::string> groups; | 316 std::vector<std::string> groups; |
319 // Loop over the callbacks registered by the plugins | 319 // Loop over the callbacks registered by the plugins |
320 bool found = false; | 320 bool found = false; |
321 for (PImpl::RestCallbacks::const_iterator it = pimpl_->restCallbacks_.begin(); | 321 for (PImpl::RestCallbacks::const_iterator it = pimpl_->restCallbacks_.begin(); |
322 it != pimpl_->restCallbacks_.end() && !found; ++it) | 322 it != pimpl_->restCallbacks_.end() && !found; ++it) |
323 { | 323 { |
324 printf(">> [%s]\n", flatUri.c_str()); | |
325 std::cout << " [" << *(it->first) << "]" << std::endl; | |
326 | |
324 // Check whether the regular expression associated to this | 327 // Check whether the regular expression associated to this |
325 // callback matches the URI | 328 // callback matches the URI |
326 boost::cmatch what; | 329 boost::cmatch what; |
327 if (boost::regex_match(flatUri.c_str(), what, *(it->first))) | 330 if (boost::regex_match(flatUri.c_str(), what, *(it->first))) |
328 { | 331 { |
332 printf("ICI\n"); | |
329 callback = it->second; | 333 callback = it->second; |
330 | 334 |
331 // Extract the value of the free parameters of the regular expression | 335 // Extract the value of the free parameters of the regular expression |
332 if (what.size() > 1) | 336 if (what.size() > 1) |
333 { | 337 { |