Permalink
Browse files

[394281] PingThread of Tomcat/JBoss adapters follows redirects

  • Loading branch information...
1 parent 15b5f94 commit 470879a93c8b1da3c08bf99ad22fbf2813ce211d @elsony elsony committed Nov 28, 2012
@@ -84,6 +84,7 @@ protected void ping() {
Trace.trace(Trace.FINEST, "Ping: pinging " + count);
URL pingUrl = new URL(url);
URLConnection conn = pingUrl.openConnection();
+ ((HttpURLConnection)conn).setInstanceFollowRedirects(false);
((HttpURLConnection)conn).getResponseCode();
// ping worked - server is up
@@ -207,7 +207,9 @@ protected void run() {
public Object getAdapter(Class adapter) {
if (Shell.class.equals(adapter))
return shell;
- return null;
+ if (String.class.equals(adapter))
+ return "user";
+ return null;
}
};
@@ -118,6 +118,8 @@ public void run(IProgressMonitor monitor) {
public Object getAdapter(Class adapter) {
if (Shell.class.equals(adapter))
return shell;
+ if (String.class.equals(adapter))
+ return "user";
return null;
}
};

0 comments on commit 470879a

Please sign in to comment.