Hello

I was having trouble with the demo objects - everything seemed to work, 
apart from being able to view the list of objects in the demo SmileyStuff 
collection. Looking at the list with URL

/fedora/get/demo:SmileyStuff/demo:Collection/list

worked, but

/fedora/objects/demo:SmileyStuff/datastreams/LIST/content

didn't. It gave this error:

Error getting 
http://itspc-cs2.st-andrews.ac.uk:443/fedora/get/demo:SmileyStuff/demo:Collection/list

It is using a secure port, but the protocol is still http, with no s.

I traced this back to 
fcrepo/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java,
 
in method getFromWeb, where there is a colon where there shouldn't be one. 
The protocol string returned by params.getProtocol doesn't include the : 
after the protocol, so the comparison fails when it should succeed.

This is a patch for it:

--- DefaultExternalContentManager.java.orig     2011-04-13 10:42:07.000000000 
+0100
+++ DefaultExternalContentManager.java  2011-04-13 10:42:19.000000000 +0100
@@ -313,7 +313,7 @@
                      new Boolean(beHash.get("callSSL"))
                              .booleanValue();
              if (backendSSL) {
-                if (params.getProtocol().equals("http:")) {
+                if (params.getProtocol().equals("http")) {
                      url = url.replaceFirst("http:", "https:");
                  }
                  url =

This has only shifted my problem, as I now get the dreaded 
"SunCertPathBuilderException: unable to find valid certification path to 
requested target" error. But that is probably a configuration error, 
rather than a bug like the above.

Swithun.

-- 
The University of St Andrews is a charity registered in Scotland: SC013532

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to