diff Core/HttpServer/MongooseServer.cpp @ 1963:af0c90ae0915

Use 403 Forbidden status if the incoming HTTP request is disallowed
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2016 17:48:47 +0200
parents 45c4387a379c
children ad95331c526a
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.cpp	Thu Apr 07 17:42:20 2016 +0200
+++ b/Core/HttpServer/MongooseServer.cpp	Thu Apr 07 17:48:47 2016 +0200
@@ -647,7 +647,8 @@
     {
       if (!filter->IsAllowed(method, request->uri, remoteIp, username.c_str(), headers))
       {
-        output.SendUnauthorized(ORTHANC_REALM);
+        //output.SendUnauthorized(ORTHANC_REALM);
+        output.SendStatus(HttpStatus_403_Forbidden);
         return;
       }
     }