Let handler run when no metadata is present.
authorscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 20 Jun 2012 20:53:03 +0000 (20:53 +0000)
committerscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 20 Jun 2012 20:53:03 +0000 (20:53 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3714 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/handler/impl/StatusHandler.cpp

index a6a4c06..d579a3a 100644 (file)
@@ -419,19 +419,20 @@ pair<bool,long> StatusHandler::processMessage(
             status = "<Partial/>";
         }
 
-        MetadataProvider* m = application.getMetadataProvider();
+        MetadataProvider* m = application.getMetadataProvider(false);
         Locker mlock(m);
 
         const PropertySet* relyingParty = nullptr;
         param=httpRequest.getParameter("entityID");
-        if (param)
+        if (m && param)
             relyingParty = application.getRelyingParty(m->getEntityDescriptor(MetadataProviderCriteria(application, param)).first);
         else
             relyingParty = &application;
 
         s << "<Application id='" << application.getId() << "' entityID='" << relyingParty->getString("entityID").second << "'/>";
 
-        m->outputStatus(s);
+        if (m)
+            m->outputStatus(s);
 
         s << "<Handlers>";
         vector<const Handler*> handlers;