Created
November 11, 2011 11:08
-
-
Save freynaud/1357759 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Eclipse Workspace Patch 1.0 | |
#P selenium | |
Index: java/server/src/org/openqa/grid/web/servlet/ProxyStatusServlet.java | |
=================================================================== | |
--- java/server/src/org/openqa/grid/web/servlet/ProxyStatusServlet.java (revision 14628) | |
+++ java/server/src/org/openqa/grid/web/servlet/ProxyStatusServlet.java (working copy) | |
@@ -17,16 +17,12 @@ | |
package org.openqa.grid.web.servlet; | |
-import org.json.JSONException; | |
-import org.json.JSONObject; | |
-import org.openqa.grid.common.exception.GridException; | |
-import org.openqa.grid.internal.Registry; | |
-import org.openqa.grid.internal.RemoteProxy; | |
- | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.lang.reflect.Method; | |
+import java.net.MalformedURLException; | |
+import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
@@ -35,6 +31,12 @@ | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
+import org.json.JSONException; | |
+import org.json.JSONObject; | |
+import org.openqa.grid.common.exception.GridException; | |
+import org.openqa.grid.internal.Registry; | |
+import org.openqa.grid.internal.RemoteProxy; | |
+ | |
public class ProxyStatusServlet extends RegistryBasedServlet { | |
private static final long serialVersionUID = 7653463271803124556L; | |
@@ -107,6 +109,11 @@ | |
id = requestJSON.getString("id"); | |
} | |
} | |
+ // see RegistrationRequest.ensureBackwardCompatibility() | |
+ try { | |
+ URL u = new URL(id); | |
+ id = "http://" + u.getHost() + ":" + u.getPort(); | |
+ } catch (MalformedURLException ignore) {} | |
// id is defined from here. | |
RemoteProxy proxy = getRegistry().getProxyById(id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment