# HG changeset patch # User Sebastien Jodogne # Date 1367841119 -7200 # Node ID d558fa565c42fc31dd978f3a6fde1294b0969027 # Parent 26290b46056b5b11a6a16d39efdfa304f9031add fix diff -r 26290b46056b -r d558fa565c42 Core/HttpServer/MongooseServer.cpp --- a/Core/HttpServer/MongooseServer.cpp Fri May 03 21:57:32 2013 +0200 +++ b/Core/HttpServer/MongooseServer.cpp Mon May 06 13:51:59 2013 +0200 @@ -681,7 +681,16 @@ // Call the proper handler for this URI UriComponents uri; - Toolbox::SplitUriComponents(uri, request->uri); + try + { + Toolbox::SplitUriComponents(uri, request->uri); + } + catch (OrthancException) + { + output.SendHeader(Orthanc_HttpStatus_400_BadRequest); + return (void*) ""; + } + HttpHandler* handler = that->FindHandler(uri); if (handler)