[Mulgara-svn] r1417 - trunk/src/jar/resolver/java/org/mulgara/resolver

ronald at mulgara.org ronald at mulgara.org
Mon Dec 15 04:05:23 UTC 2008


Author: ronald
Date: 2008-12-14 20:05:22 -0800 (Sun, 14 Dec 2008)
New Revision: 1417

Modified:
   trunk/src/jar/resolver/java/org/mulgara/resolver/DatabaseOperationContext.java
Log:
Fix local-URI creation when canonocalizing the graph URI. Previously it was
ignoring the port, causing graph-lookup failures whenever the server was
running on a non-default RMI port and being accessed using anything but the
canonical hostname.

This fix also makes sure any user-info and query gets preserved too.

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/DatabaseOperationContext.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/DatabaseOperationContext.java	2008-12-15 04:05:14 UTC (rev 1416)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/DatabaseOperationContext.java	2008-12-15 04:05:22 UTC (rev 1417)
@@ -573,7 +573,8 @@
     String newHost = metadata.getSystemModelURI().getHost();
     // update the URI
     try {
-      URI newGraphURI = new URI(uri.getScheme(), newHost, uri.getPath(), uri.getFragment());
+      URI newGraphURI = new URI(uri.getScheme(), uri.getUserInfo(), newHost, uri.getPort(),
+                                uri.getPath(), uri.getQuery(), uri.getFragment());
       logger.debug("Changing graph URI from " + uri + " to " + newGraphURI);
 
       return new URIReferenceImpl(newGraphURI);




More information about the Mulgara-svn mailing list