Author: ron.sigal(a)jboss.com
Date: 2008-06-10 01:48:55 -0400 (Tue, 10 Jun 2008)
New Revision: 4284
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java
Log:
JBREM-981: getInvokerFromInvokerUrl() calls InvokereLocator.validateLocator().
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java 2008-06-10
05:47:14 UTC (rev 4283)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.java 2008-06-10
05:48:55 UTC (rev 4284)
@@ -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;
/**
@@ -181,6 +182,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)
@@ -189,7 +200,7 @@
{
ServerInvoker svrInvoker = serverInvokers[x];
InvokerLocator locator = svrInvoker.getLocator();
- if (locatorUrl.equalsIgnoreCase(locator.getOriginalURI()))
+ if (locatorUrl.equalsIgnoreCase(locator.getLocatorURI()))
{
return (ServletServerInvokerMBean) svrInvoker;
}
Show replies by date