[jboss-remoting-commits] JBoss Remoting SVN: r4205 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Tue May 20 22:01:20 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-05-20 22:01:20 -0400 (Tue, 20 May 2008)
New Revision: 4205
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java
Log:
JBREM-980: (1) Processs InvokerLocator with InvokerLocator.validateLocator() before matching; (2) matches against InvokerLocator.getLocatorURI() instead of getOriginalURI().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java 2008-05-21 01:59:13 UTC (rev 4204)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java 2008-05-21 02:01:20 UTC (rev 4205)
@@ -42,6 +42,7 @@
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.util.Iterator;
/**
@@ -180,6 +181,16 @@
{
return null;
}
+ try
+ {
+ InvokerLocator validatedLocator = new InvokerLocator(locatorUrl);
+ locatorUrl = InvokerLocator.validateLocator(validatedLocator).getLocatorURI();
+ }
+ catch (MalformedURLException e)
+ {
+ log.warn("malformed URL: " + locatorUrl);
+ return null;
+ }
ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers();
if (serverInvokers != null && serverInvokers.length > 0)
@@ -188,7 +199,7 @@
{
ServerInvoker svrInvoker = serverInvokers[x];
InvokerLocator locator = svrInvoker.getLocator();
- if (locatorUrl.equalsIgnoreCase(locator.getOriginalURI()))
+ if (locatorUrl.equalsIgnoreCase(locator.getLocatorURI()))
{
return (ServletServerInvokerMBean) svrInvoker;
}
More information about the jboss-remoting-commits
mailing list