IGNITE-141 - Fix for grid start
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1a1a49bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1a1a49bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1a1a49bc Branch: refs/heads/ignite-141 Commit: 1a1a49bca0b9cc36c78cd37414c6923e4feef0a0 Parents: 2ebb270 Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Thu Mar 5 16:55:17 2015 -0800 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Thu Mar 5 16:55:17 2015 -0800 ---------------------------------------------------------------------- .../apache/ignite/internal/GridUpdateNotifier.java | 15 --------------- .../org/apache/ignite/internal/util/IgniteUtils.java | 2 ++ 2 files changed, 2 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a1a49bc/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java index 903171f..f560921 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java @@ -259,13 +259,6 @@ class GridUpdateNotifier { /** {@inheritDoc} */ @Override protected void body() throws InterruptedException { - // Set the http.strictPostRedirect property to prevent redirected POST from being mapped to a GET. - // This system property was a hack to fix a jdk bug w/out changing back compat behavior. - // It's bogus that this is a system (and not a per-connection) property, - // so we just change it for the duration of the connection. - // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4023866 - String postRedirect = System.getProperty("http.strictPostRedirect"); - try { String stackTrace = gw != null ? gw.userStackTrace() : null; @@ -286,8 +279,6 @@ class GridUpdateNotifier { conn.setConnectTimeout(3000); conn.setReadTimeout(3000); - System.setProperty("http.strictPostRedirect", "true"); - Document dom = null; try { @@ -328,12 +319,6 @@ class GridUpdateNotifier { if (log.isDebugEnabled()) log.debug("Unexpected exception in update checker. " + e.getMessage()); } - finally { - if (postRedirect == null) - System.clearProperty("http.strictPostRedirect"); - else - System.setProperty("http.strictPostRedirect", postRedirect); - } } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a1a49bc/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java index 4eee747..8b20a8c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java @@ -516,6 +516,8 @@ public abstract class IgniteUtils { } exceptionConverters = Collections.unmodifiableMap(exceptionConverters()); + + System.setProperty("http.strictPostRedirect", "true"); } /**