Let handler run when no metadata is present.
[shibboleth/sp.git] / 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;