comparison 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
comparison
equal deleted inserted replaced
1962:22ddb22fce83 1963:af0c90ae0915
645 const IIncomingHttpRequestFilter *filter = that->GetIncomingHttpRequestFilter(); 645 const IIncomingHttpRequestFilter *filter = that->GetIncomingHttpRequestFilter();
646 if (filter != NULL) 646 if (filter != NULL)
647 { 647 {
648 if (!filter->IsAllowed(method, request->uri, remoteIp, username.c_str(), headers)) 648 if (!filter->IsAllowed(method, request->uri, remoteIp, username.c_str(), headers))
649 { 649 {
650 output.SendUnauthorized(ORTHANC_REALM); 650 //output.SendUnauthorized(ORTHANC_REALM);
651 output.SendStatus(HttpStatus_403_Forbidden);
651 return; 652 return;
652 } 653 }
653 } 654 }
654 655
655 656