changeset 415:d558fa565c42

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 May 2013 13:51:59 +0200
parents 26290b46056b
children 1188cb0ddaa5
files Core/HttpServer/MongooseServer.cpp
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)