Hi Swithun,

Good catch. This is now fixed in master. Thanks for the patch.

https://jira.duraspace.org/browse/FCREPO-908

- Chris

On Wed, Apr 13, 2011 at 6:11 AM, Swithun Crowe <c...@st-andrews.ac.uk> wrote:
> 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

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to