comparison Core/Toolbox.cpp @ 207:7f74209ea0f8

RestApi
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Nov 2012 16:23:11 +0100
parents 8e673a65564d
children c9b3ba0fd140
comparison
equal deleted inserted replaced
206:4453a010d0db 207:7f74209ea0f8
286 286
287 if (start < uri.size()) 287 if (start < uri.size())
288 { 288 {
289 components.push_back(std::string(&uri[start], end - start)); 289 components.push_back(std::string(&uri[start], end - start));
290 } 290 }
291
292 for (size_t i = 0; i < components.size(); i++)
293 {
294 if (components[i].size() == 0)
295 {
296 // Empty component, as in: "/coucou//e"
297 throw OrthancException(ErrorCode_UriSyntax);
298 }
299 }
291 } 300 }
292 301
293 302
294 bool Toolbox::IsChildUri(const UriComponents& baseUri, 303 bool Toolbox::IsChildUri(const UriComponents& baseUri,
295 const UriComponents& testedUri) 304 const UriComponents& testedUri)