[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynam...

noreply at shibboleth.net noreply at shibboleth.net
Fri Oct 3 20:18:06 EDT 2014


Author: putmanb
Date: Fri Oct  3 20:18:06 2014
New Revision: 4097

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4097&view=rev
Log:
If receive a non-success HTTP status code, this should just be a failure to resolve, not a fatal error.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java?rev=4097&r1=4096&r2=4097&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java Fri Oct  3 20:18:06 2014
@@ -249,10 +249,8 @@
         }
 
         if (httpStatusCode != HttpStatus.SC_OK) {
-            String errMsg = "Non-ok status code " + httpStatusCode + " returned from remote metadata source: " 
-                    + requestURI;
-            log.error(errMsg);
-            throw new ResolverException(errMsg);
+            log.warn("Non-ok status code '{}' returned from remote metadata source: {}", httpStatusCode, requestURI);
+            return;
         }
         
         
@@ -261,7 +259,6 @@
             try {
                 validateResponse(response, requestURI);
             } catch (ResolverException e) {
-                // TODO for now don't treat this as fatal, just return. Maybe re-evaluate.
                 log.error("Problem validating dynamic metadata HTTP response", e);
                 return;
             }
@@ -270,7 +267,6 @@
                 InputStream ins = response.getEntity().getContent();
                 root = unmarshallMetadata(ins);
             } catch (IOException | UnmarshallingException e) {
-                // TODO for now don't treat this as fatal, just return. Maybe re-evaluate.
                 log.error("Error unmarshalling HTTP response stream", e);
                 return;
             }
@@ -281,7 +277,6 @@
         try {
             processNewMetadata(root);
         } catch (FilterException e) {
-            // TODO for now don't treat this as fatal, just return. Maybe re-evaluate.
             log.error("Metadata filtering problem processing new metadata", e);
             return;
         }



More information about the commits mailing list