changeset 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 22ddb22fce83
children 5a80fb3402e0
files Core/HttpServer/MongooseServer.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;
       }
     }