svn commit: r1623684 - /tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
Author: markt Date: Tue Sep 9 08:13:42 2014 New Revision: 1623684 URL: http://svn.apache.org/r1623684 Log: Remove deprecated code Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1623684&r1=1623683&r2=1623684&view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Tue Sep 9 08:13:42 2014 @@ -19,8 +19,6 @@ package org.apache.catalina.authenticato import java.io.IOException; import java.io.StringReader; import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import java.security.Principal; import java.util.LinkedHashMap; import java.util.Map; @@ -57,33 +55,17 @@ public class DigestAuthenticator extends */ protected static final String QOP = "auth"; -// --- Constructors +// --- Constructors public DigestAuthenticator() { super(); setCache(false); -try { -if (md5Helper == null) { -md5Helper = MessageDigest.getInstance("MD5"); -} -} catch (NoSuchAlgorithmException e) { -throw new IllegalStateException(e); -} } // - Instance Variables - -/** - * MD5 message digest provider. - * @deprecated Unused - will be removed in Tomcat 8.0.x onwards - */ -@Deprecated -protected static volatile MessageDigest md5Helper; - - /** * List of server nonce values currently being tracked */ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623685 - in /tomcat/trunk: java/org/apache/catalina/authenticator/ java/org/apache/catalina/realm/ java/org/apache/catalina/servlets/ java/org/apache/catalina/util/ java/org/apache/tomca
Author: markt Date: Tue Sep 9 08:22:28 2014 New Revision: 1623685 URL: http://svn.apache.org/r1623685 Log: Move MessageDigest utility classes from o.a.catalina.util to o.a.tomcat.util.security so they are more widely available. Added: tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java - copied, changed from r1623457, tomcat/trunk/java/org/apache/catalina/util/ConcurrentMessageDigest.java tomcat/trunk/java/org/apache/tomcat/util/security/MD5Encoder.java - copied, changed from r1623457, tomcat/trunk/java/org/apache/catalina/util/MD5Encoder.java Removed: tomcat/trunk/java/org/apache/catalina/util/ConcurrentMessageDigest.java tomcat/trunk/java/org/apache/catalina/util/MD5Encoder.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1623685&r1=1623684&r2=1623685&view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Tue Sep 9 08:22:28 2014 @@ -29,11 +29,11 @@ import javax.servlet.http.HttpServletRes import org.apache.catalina.LifecycleException; import org.apache.catalina.Realm; import org.apache.catalina.connector.Request; -import org.apache.catalina.util.ConcurrentMessageDigest; -import org.apache.catalina.util.MD5Encoder; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.http.parser.Authorization; +import org.apache.tomcat.util.security.ConcurrentMessageDigest; +import org.apache.tomcat.util.security.MD5Encoder; /** Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1623685&r1=1623684&r2=1623685&view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Tue Sep 9 08:22:28 2014 @@ -46,7 +46,6 @@ import org.apache.catalina.Wrapper; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.util.LifecycleMBeanBase; -import org.apache.catalina.util.MD5Encoder; import org.apache.catalina.util.SessionConfig; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -56,6 +55,7 @@ import org.apache.tomcat.util.codec.bina import org.apache.tomcat.util.descriptor.web.SecurityCollection; import org.apache.tomcat.util.descriptor.web.SecurityConstraint; import org.apache.tomcat.util.res.StringManager; +import org.apache.tomcat.util.security.MD5Encoder; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSException; Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1623685&r1=1623684&r2=1623685&view=diff == --- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Tue Sep 9 08:22:28 2014 @@ -44,11 +44,11 @@ import javax.xml.parsers.ParserConfigura import org.apache.catalina.WebResource; import org.apache.catalina.util.ConcurrentDateFormat; import org.apache.catalina.util.DOMWriter; -import org.apache.catalina.util.MD5Encoder; import org.apache.catalina.util.XMLWriter; import org.apache.tomcat.util.buf.UDecoder; import org.apache.tomcat.util.http.FastHttpDateFormat; import org.apache.tomcat.util.http.RequestUtil; +import org.apache.tomcat.util.security.MD5Encoder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; Copied: tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java (from r1623457, tomcat/trunk/java/org/apache/catalina/util/ConcurrentMessageDigest.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java?p2=tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.j
svn commit: r1623691 - in /tomcat/trunk: java/org/apache/catalina/startup/HostConfig.java webapps/docs/changelog.xml
Author: kfujino Date: Tue Sep 9 08:40:56 2014 New Revision: 1623691 URL: http://svn.apache.org/r1623691 Log: When using parallel deployment, correctly undeploy context of old version. Make sure that never undeploy older Context If current context is not running. Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1623691&r1=1623690&r2=1623691&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Tue Sep 9 08:40:56 2014 @@ -1520,7 +1520,7 @@ public class HostConfig Context previousContext = (Context) host.findChild(previous.getName()); Context currentContext = -(Context) host.findChild(previous.getName()); +(Context) host.findChild(current.getName()); if (previousContext != null && currentContext != null && currentContext.getState().isAvailable() && !isServiced(previous.getName())) { Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623691&r1=1623690&r2=1623691&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Sep 9 08:40:56 2014 @@ -116,6 +116,11 @@ Refactor to reduce code duplication identified by Simian. (markt) + +When using parallel deployment, correctly undeploy context of old +version. Make sure that never undeploy older Context If current context +is not running. (kfujino) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623692 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/startup/HostConfig.java webapps/docs/changelog.xml
Author: kfujino Date: Tue Sep 9 08:42:33 2014 New Revision: 1623692 URL: http://svn.apache.org/r1623692 Log: When using parallel deployment, correctly undeploy context of old version. Make sure that never undeploy older Context If current context is not running. Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1623692&r1=1623691&r2=1623692&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Tue Sep 9 08:42:33 2014 @@ -1695,7 +1695,7 @@ public class HostConfig Context previousContext = (Context) host.findChild(previous.getName()); Context currentContext = -(Context) host.findChild(previous.getName()); +(Context) host.findChild(current.getName()); if (previousContext != null && currentContext != null && currentContext.getState().isAvailable() && !isServiced(previous.getName())) { Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1623692&r1=1623691&r2=1623692&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Sep 9 08:42:33 2014 @@ -145,6 +145,11 @@ Fix some potential resource leaks when reading properties, files and other resources. Reported by Coverity Scan. (violetagg) + +When using parallel deployment, correctly undeploy context of old +version. Make sure that never undeploy older Context If current context +is not running. (kfujino) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623693 - /tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
Author: markt Date: Tue Sep 9 08:46:51 2014 New Revision: 1623693 URL: http://svn.apache.org/r1623693 Log: Add SHA-1 support Add support for input consisting of multiply byte arrays (both changes are prep for switching WebSocket to use this utility class) Modified: tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java Modified: tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java?rev=1623693&r1=1623692&r2=1623693&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java Tue Sep 9 08:46:51 2014 @@ -31,6 +31,7 @@ import java.util.concurrent.ConcurrentLi public class ConcurrentMessageDigest { private static final String MD5 = "MD5"; +private static final String SHA1 = "SHA-1"; private static final Map> queues = new HashMap<>(); @@ -44,16 +45,21 @@ public class ConcurrentMessageDigest { try { // Init commonly used algorithms init(MD5); +init(SHA1); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException(e); } } -public static byte[] digestMD5(byte[] input) { +public static byte[] digestMD5(byte[]... input) { return digest(MD5, input); } -public static byte[] digest(String algorithm, byte[] input) { +public static byte[] digestSHA1(byte[]... input) { +return digest(SHA1, input); +} + +public static byte[] digest(String algorithm, byte[]... input) { Queue queue = queues.get(algorithm); if (queue == null) { @@ -71,7 +77,10 @@ public class ConcurrentMessageDigest { } } -byte[] result = md.digest(input); +for (byte[] bytes : input) { +md.update(bytes); +} +byte[] result = md.digest(); queue.add(md); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623695 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
Author: markt Date: Tue Sep 9 08:48:41 2014 New Revision: 1623695 URL: http://svn.apache.org/r1623695 Log: Switch creation of the SHA-1 digest required to generate a WebSocket upgrade to use the ConcurrentMessageDigest rather than using a dedicated Queue. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java?rev=1623695&r1=1623694&r2=1623695&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java Tue Sep 9 08:48:41 2014 @@ -18,16 +18,12 @@ package org.apache.tomcat.websocket.serv import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Queue; -import java.util.concurrent.ConcurrentLinkedQueue; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -40,6 +36,7 @@ import javax.websocket.HandshakeResponse import javax.websocket.server.ServerEndpointConfig; import org.apache.tomcat.util.codec.binary.Base64; +import org.apache.tomcat.util.security.ConcurrentMessageDigest; import org.apache.tomcat.websocket.Constants; import org.apache.tomcat.websocket.Transformation; import org.apache.tomcat.websocket.TransformationFactory; @@ -52,8 +49,6 @@ public class UpgradeUtil { private static final byte[] WS_ACCEPT = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11".getBytes( StandardCharsets.ISO_8859_1); -private static final Queue sha1Helpers = -new ConcurrentLinkedQueue<>(); private UpgradeUtil() { // Utility class. Hide default constructor. @@ -300,19 +295,9 @@ public class UpgradeUtil { } -private static String getWebSocketAccept(String key) throws ServletException { -MessageDigest sha1Helper = sha1Helpers.poll(); -if (sha1Helper == null) { -try { -sha1Helper = MessageDigest.getInstance("SHA1"); -} catch (NoSuchAlgorithmException e) { -throw new ServletException(e); -} -} -sha1Helper.reset(); -sha1Helper.update(key.getBytes(StandardCharsets.ISO_8859_1)); -String result = Base64.encodeBase64String(sha1Helper.digest(WS_ACCEPT)); -sha1Helpers.add(sha1Helper); -return result; +private static String getWebSocketAccept(String key) { +byte[] digest = ConcurrentMessageDigest.digestSHA1( +key.getBytes(StandardCharsets.ISO_8859_1), WS_ACCEPT); +return Base64.encodeBase64String(digest); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623704 - in /tomcat/trunk: java/org/apache/catalina/servlets/WebdavServlet.java webapps/docs/changelog.xml
Author: markt Date: Tue Sep 9 08:57:00 2014 New Revision: 1623704 URL: http://svn.apache.org/r1623704 Log: Fix unsafe concurrent use of MD5 digest by multiple threads Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1623704&r1=1623703&r2=1623704&view=diff == --- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Tue Sep 9 08:57:00 2014 @@ -21,8 +21,6 @@ import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import java.util.Date; import java.util.Enumeration; import java.util.Hashtable; @@ -34,7 +32,6 @@ import java.util.Vector; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; -import javax.servlet.UnavailableException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.DocumentBuilder; @@ -48,6 +45,7 @@ import org.apache.catalina.util.XMLWrite import org.apache.tomcat.util.buf.UDecoder; import org.apache.tomcat.util.http.FastHttpDateFormat; import org.apache.tomcat.util.http.RequestUtil; +import org.apache.tomcat.util.security.ConcurrentMessageDigest; import org.apache.tomcat.util.security.MD5Encoder; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -191,12 +189,6 @@ public class WebdavServlet TimeZone.getTimeZone("GMT")); - /** - * MD5 message digest provider. - */ -protected static MessageDigest md5Helper; - - // - Instance Variables /** @@ -271,14 +263,6 @@ public class WebdavServlet if (getServletConfig().getInitParameter("allowSpecialPaths") != null) allowSpecialPaths = Boolean.parseBoolean( getServletConfig().getInitParameter("allowSpecialPaths")); - -// Load the MD5 helper used to calculate signatures. -try { -md5Helper = MessageDigest.getInstance("MD5"); -} catch (NoSuchAlgorithmException e) { -throw new UnavailableException("No MD5"); -} - } @@ -1076,7 +1060,7 @@ public class WebdavServlet + lock.depth + "-" + lock.owner + "-" + lock.tokens + "-" + lock.expiresAt + "-" + System.currentTimeMillis() + "-" + secret; -String lockToken = MD5Encoder.encode(md5Helper.digest( +String lockToken = MD5Encoder.encode(ConcurrentMessageDigest.digestMD5( lockTokenStr.getBytes(StandardCharsets.ISO_8859_1))); if (resource.isDirectory() && lock.depth == maxDepth) { Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623704&r1=1623703&r2=1623704&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Sep 9 08:57:00 2014 @@ -121,6 +121,9 @@ version. Make sure that never undeploy older Context If current context is not running. (kfujino) + +Fix threading issue when locking resources via WebDAV. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623723 - in /tomcat/trunk: java/org/apache/catalina/realm/RealmBase.java webapps/docs/changelog.xml
Author: markt Date: Tue Sep 9 09:09:17 2014 New Revision: 1623723 URL: http://svn.apache.org/r1623723 Log: Deprecate md5Helper and switch to using ConcurrentMessageDigest Reviewing the code, this also fixes a rare threading issue. Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1623723&r1=1623722&r2=1623723&view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Tue Sep 9 09:09:17 2014 @@ -55,6 +55,7 @@ import org.apache.tomcat.util.codec.bina import org.apache.tomcat.util.descriptor.web.SecurityCollection; import org.apache.tomcat.util.descriptor.web.SecurityConstraint; import org.apache.tomcat.util.res.StringManager; +import org.apache.tomcat.util.security.ConcurrentMessageDigest; import org.apache.tomcat.util.security.MD5Encoder; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSCredential; @@ -109,7 +110,10 @@ public abstract class RealmBase extends /** * MD5 message digest provider. + * + * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards. */ +@Deprecated protected static volatile MessageDigest md5Helper; @@ -390,11 +394,7 @@ public abstract class RealmBase extends throw new IllegalArgumentException(uee.getMessage()); } -String serverDigest = null; -// Bugzilla 32137 -synchronized(md5Helper) { -serverDigest = MD5Encoder.encode(md5Helper.digest(valueBytes)); -} +String serverDigest = MD5Encoder.encode(ConcurrentMessageDigest.digestMD5(valueBytes)); if (log.isDebugEnabled()) { log.debug("Digest : " + clientDigest + " Username:" + username @@ -1211,15 +1211,6 @@ public abstract class RealmBase extends * Return the digest associated with given principal's user name. */ protected String getDigest(String username, String realmName) { -if (md5Helper == null) { -try { -md5Helper = MessageDigest.getInstance("MD5"); -} catch (NoSuchAlgorithmException e) { -log.error("Couldn't get MD5 digest: ", e); -throw new IllegalStateException(e.getMessage()); -} -} - if (hasMessageDigest()) { // Use pre-generated digest return getPassword(username); @@ -1236,13 +1227,7 @@ public abstract class RealmBase extends throw new IllegalArgumentException(uee.getMessage()); } -byte[] digest; -// Bugzilla 32137 -synchronized(md5Helper) { -digest = md5Helper.digest(valueBytes); -} - -return MD5Encoder.encode(digest); +return MD5Encoder.encode(ConcurrentMessageDigest.digestMD5(valueBytes)); } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623723&r1=1623722&r2=1623723&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Sep 9 09:09:17 2014 @@ -122,7 +122,12 @@ is not running. (kfujino) -Fix threading issue when locking resources via WebDAV. (markt) +Fix a rare threading issue when locking resources via WebDAV. +(markt) + + +Fix a rare threading issue when using HTTP digest authentication. +(markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623728 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
Author: markt Date: Tue Sep 9 09:36:48 2014 New Revision: 1623728 URL: http://svn.apache.org/r1623728 Log: Replace use of MessageDigest with ConcurrentMessageDigest Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1623728&r1=1623727&r2=1623728&view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Tue Sep 9 09:36:48 2014 @@ -104,7 +104,10 @@ public abstract class RealmBase extends /** * The MessageDigest object for digesting user credentials (passwords). + * + * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards. */ +@Deprecated protected volatile MessageDigest md = null; @@ -509,12 +512,8 @@ public abstract class RealmBase extends // Server is storing digested passwords with a prefix indicating // the digest type String serverDigest = serverCredentials.substring(5); -String userDigest; -synchronized (this) { -md.reset(); - md.update(userCredentials.getBytes(StandardCharsets.ISO_8859_1)); -userDigest = Base64.encodeBase64String(md.digest()); -} +String userDigest = Base64.encodeBase64String(ConcurrentMessageDigest.digest( +getDigest(), userCredentials.getBytes(StandardCharsets.ISO_8859_1))); return userDigest.equals(serverDigest); } else if (serverCredentials.startsWith("{SSHA}")) { @@ -531,19 +530,16 @@ public abstract class RealmBase extends byte[] serverDigestBytes = new byte[saltPos]; System.arraycopy(serverDigestPlusSaltBytes, 0, serverDigestBytes, 0, saltPos); +final int saltLength = serverDigestPlusSaltBytes.length - saltPos; +byte[] serverSaltBytes = new byte[saltLength]; +System.arraycopy(serverDigestPlusSaltBytes, saltPos, +serverSaltBytes, 0, saltLength); // Generate the digested form of the user provided password // using the salt -byte[] userDigestBytes; -synchronized (this) { -md.reset(); -// User provided password - md.update(userCredentials.getBytes(StandardCharsets.ISO_8859_1)); -// Add the salt -md.update(serverDigestPlusSaltBytes, saltPos, -serverDigestPlusSaltBytes.length - saltPos); -userDigestBytes = md.digest(); -} +byte[] userDigestBytes = ConcurrentMessageDigest.digest(getDigest(), +userCredentials.getBytes(StandardCharsets.ISO_8859_1), +serverSaltBytes); return Arrays.equals(userDigestBytes, serverDigestBytes); @@ -1120,13 +1116,16 @@ public abstract class RealmBase extends protected void startInternal() throws LifecycleException { // Create a MessageDigest instance for credentials, if desired -if (digest != null) { + +if (getDigest() != null) { try { -md = MessageDigest.getInstance(digest); +md = MessageDigest.getInstance(getDigest()); +ConcurrentMessageDigest.init(getDigest()); } catch (NoSuchAlgorithmException e) { throw new LifecycleException -(sm.getString("realmBase.algorithm", digest), e); +(sm.getString("realmBase.algorithm", getDigest()), e); } + } setState(LifecycleState.STARTING); @@ -1183,8 +1182,6 @@ public abstract class RealmBase extends // Digest the user credentials and return as hexadecimal synchronized (this) { try { -md.reset(); - byte[] bytes = null; try { bytes = credentials.getBytes(getDigestCharset()); @@ -1192,9 +1189,8 @@ public abstract class RealmBase extends log.error("Illegal digestEncoding: " + getDigestEncoding(), uee); throw new IllegalArgumentException(uee.getMessage()); } -md.update(bytes); -return (HexUtils.toHexString(md.digest())); +return (HexUtils.toHexString(ConcurrentMessageDigest.digest(getDigest(), bytes))); } catch (Exception e) { log.error(sm.getString("realmBase.digest"), e); return (credentials); @@ -
Re: svn commit: r1623243 - /tomcat/trunk/res/checkstyle/checkstyle.xml
2014-09-08 2:49 GMT+04:00 : > Author: markt > Date: Sun Sep 7 22:49:17 2014 > New Revision: 1623243 > > URL: http://svn.apache.org/r1623243 > Log: > Enable the nested blocks check > > Modified: > tomcat/trunk/res/checkstyle/checkstyle.xml > > Modified: tomcat/trunk/res/checkstyle/checkstyle.xml > URL: > http://svn.apache.org/viewvc/tomcat/trunk/res/checkstyle/checkstyle.xml?rev=1623243&r1=1623242&r2=1623243&view=diff > == > --- tomcat/trunk/res/checkstyle/checkstyle.xml (original) > +++ tomcat/trunk/res/checkstyle/checkstyle.xml Sun Sep 7 22:49:17 2014 > @@ -43,9 +43,9 @@ > > value="${tomcat.output}/res/checkstyle/cachefile-checkstyle.xml"/> > > > - > + > + > + > > > FYI: I do not like this change. Limiting the scope of some local variables helps to isolate logic blocks and helps to avoid some copy-paste errors when you forget to rename a helper variable in a copy-pasted block. E.g. http://svn.apache.org/r1623238 http://svn.apache.org/r1623241 There was no technical issues fixed by these changes, so there are not much to discuss here. I am just afraid that forcing such a rule will lead to coding errors. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1623243 - /tomcat/trunk/res/checkstyle/checkstyle.xml
On 09/09/2014 11:06, Konstantin Kolinko wrote: > 2014-09-08 2:49 GMT+04:00 : >> Author: markt >> Date: Sun Sep 7 22:49:17 2014 >> New Revision: 1623243 >> >> URL: http://svn.apache.org/r1623243 >> Log: >> Enable the nested blocks check >> >> Modified: >> tomcat/trunk/res/checkstyle/checkstyle.xml >> >> Modified: tomcat/trunk/res/checkstyle/checkstyle.xml >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/res/checkstyle/checkstyle.xml?rev=1623243&r1=1623242&r2=1623243&view=diff >> == >> --- tomcat/trunk/res/checkstyle/checkstyle.xml (original) >> +++ tomcat/trunk/res/checkstyle/checkstyle.xml Sun Sep 7 22:49:17 2014 >> @@ -43,9 +43,9 @@ >> >> value="${tomcat.output}/res/checkstyle/cachefile-checkstyle.xml"/> >> >> >> - >> + >> + >> + >> >> >> > > FYI: I do not like this change. > > Limiting the scope of some local variables helps to isolate logic > blocks and helps to avoid some copy-paste errors when you forget to > rename a helper variable in a copy-pasted block. There was one case of using that technique in the main code and one in the test code. I think it is fair to say it hasn't been widely used. The main thing I have against it is readability as - to my eye at least - it makes it harder to read. Cheers, Mark > > E.g. > http://svn.apache.org/r1623238 > http://svn.apache.org/r1623241 > > > There was no technical issues fixed by these changes, so there are not > much to discuss here. I am just afraid that forcing such a rule will > lead to coding errors. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56929] Wrong OS version on Windows 2012 R2 while running as a service
https://issues.apache.org/bugzilla/show_bug.cgi?id=56929 --- Comment #2 from Konstantin Kolinko --- (In reply to Mark Thomas from comment #1) > You need to raise this with the Apache Commons Daemon project that produces > those binaries. https://issues.apache.org/jira/browse/DAEMON-322 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623779 - /tomcat/trunk/webapps/docs/changelog.xml
Author: kkolinko Date: Tue Sep 9 12:02:40 2014 New Revision: 1623779 URL: http://svn.apache.org/r1623779 Log: Improve changelog message for r1623691 Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623779&r1=1623778&r2=1623779&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Sep 9 12:02:40 2014 @@ -117,9 +117,10 @@ Refactor to reduce code duplication identified by Simian. (markt) -When using parallel deployment, correctly undeploy context of old -version. Make sure that never undeploy older Context If current context -is not running. (kfujino) +When using parallel deployment and undeployOldVersions +feature is enabled on a Host, correctly undeploy context of old +version. Make sure that Tomcat does not undeploy older Context if +current context is not running. (kfujino) Fix a rare threading issue when locking resources via WebDAV. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623780 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/changelog.xml
Author: kkolinko Date: Tue Sep 9 12:08:37 2014 New Revision: 1623780 URL: http://svn.apache.org/r1623780 Log: Improve changelog message for r1623692 Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1623779 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1623780&r1=1623779&r2=1623780&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Sep 9 12:08:37 2014 @@ -146,9 +146,10 @@ other resources. Reported by Coverity Scan. (violetagg) -When using parallel deployment, correctly undeploy context of old -version. Make sure that never undeploy older Context If current context -is not running. (kfujino) +When using parallel deployment and undeployOldVersions +feature is enabled on a Host, correctly undeploy context of old +version. Make sure that Tomcat does not undeploy older Context if +current context is not running. (kfujino) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623804 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java java/org/apache/catalina/startup/LocalStrings.properties webapps/docs/changelog.xml
Author: kkolinko Date: Tue Sep 9 12:41:17 2014 New Revision: 1623804 URL: http://svn.apache.org/r1623804 Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=56401 Followup to r1623471 - I18n for the log messages. Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1623804&r1=1623803&r2=1623804&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Tue Sep 9 12:41:17 2014 @@ -787,14 +787,22 @@ public class Catalina { private void logInfo() { -log.info("Server version: " + ServerInfo.getServerInfo()); -log.info("Server built: " + ServerInfo.getServerBuilt()); -log.info("Server number: " + ServerInfo.getServerNumber()); -log.info("OS Name:" + System.getProperty("os.name")); -log.info("OS Version: " + System.getProperty("os.version")); -log.info("Architecture: " + System.getProperty("os.arch")); -log.info("JVM Version:" + System.getProperty("java.runtime.version")); -log.info("JVM Vendor: " + System.getProperty("java.vm.vendor")); +log.info(sm.getString("catalina.serverInfo.server.version", +ServerInfo.getServerInfo())); +log.info(sm.getString("catalina.serverInfo.server.built", +ServerInfo.getServerBuilt())); +log.info(sm.getString("catalina.serverInfo.server.number", +ServerInfo.getServerNumber())); +log.info(sm.getString("catalina.serverInfo.os.name", +System.getProperty("os.name"))); +log.info(sm.getString("catalina.serverInfo.os.version", +System.getProperty("os.version"))); +log.info(sm.getString("catalina.serverInfo.os.arch", +System.getProperty("os.arch"))); +log.info(sm.getString("catalina.serverInfo.vm.version", +System.getProperty("java.runtime.version"))); +log.info(sm.getString("catalina.serverInfo.vm.vendor", +System.getProperty("java.vm.vendor"))); } Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1623804&r1=1623803&r2=1623804&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Tue Sep 9 12:41:17 2014 @@ -15,6 +15,14 @@ catalina.configFail=Unable to load server configuration from [{0}] catalina.noCluster=Cluster RuleSet not found due to [{0}]. Cluster configuration disabled. +catalina.serverInfo.server.version=Server version: {0} +catalina.serverInfo.server.built =Server built: {0} +catalina.serverInfo.server.number =Server number: {0} +catalina.serverInfo.os.name =OS Name:{0} +catalina.serverInfo.os.version=OS Version: {0} +catalina.serverInfo.os.arch =Architecture: {0} +catalina.serverInfo.vm.version=JVM Version:{0} +catalina.serverInfo.vm.vendor =JVM Vendor: {0} catalina.serverStartFail=The required Server component failed to start so Tomcat is unable to start. catalina.shutdownHookFail=The shutdown hook experienced an error while trying to stop the server catalina.stopServer=No shutdown port configured. Shut down server through OS signal. Server not shut down. Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1623804&r1=1623803&r2=1623804&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Sep 9 12:41:17 2014 @@ -64,7 +64,8 @@ correctly handle these cookies. (markt) -56401: Log version information when Tomcat starts. (markt) +56401: Log version information when Tomcat starts. +(markt/kkolinko) 56530: Add a web application class loader implementation that - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56401] Log version information on startup
https://issues.apache.org/bugzilla/show_bug.cgi?id=56401 Konstantin Kolinko changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #2 from Konstantin Kolinko --- Several comments, from testing this and adding i18n in r1623804 1. It is good that this does not affect embedded Tomcat. There are no changes in the information logged by unit tests. 2. The Catalina.logInfo() method is called from Catalina class constructor. As such, it performs logging on shutdown.bat. I think it should not perform logging on shutdown. As such, I am REOPENing this. An alternative implementation could be a in server.xml that prints such information. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56530] WebappClassLoader.loadClass synchronization issue due to coarse lock at WebappClassLoader instance level instead of been by class name
https://issues.apache.org/bugzilla/show_bug.cgi?id=56530 --- Comment #8 from Konstantin Kolinko --- Just some documentation notes. As a reference about this new feature. 1. This feature is off by default. 2. To enable it, add the following XML element either to the context file of your web application, or to the global conf/context.xml (to enable this for all webapps by default): It works for me with JDK 7u67. Once 8.0.13 (or later) is officially released, the documentation will be at http://tomcat.apache.org/tomcat-8.0-doc/config/loader.html 3. MBeans for the new class are visible in jconsole application, under Catalina/ParallelWebappClassloader. An ObjectName looks like Catalina:type=ParallelWebappClassLoader,host=localhost,context=/examples -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623839 - in /tomcat/trunk/webapps/docs/config: context.xml loader.xml
Author: kkolinko Date: Tue Sep 9 14:58:10 2014 New Revision: 1623839 URL: http://svn.apache.org/r1623839 Log: For https://issues.apache.org/bugzilla/show_bug.cgi?id=56530 Correct a typo. Reorder sentences and split into two paragraphs. (Review of r1623360.) Modified: tomcat/trunk/webapps/docs/config/context.xml tomcat/trunk/webapps/docs/config/loader.xml Modified: tomcat/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1623839&r1=1623838&r2=1623839&view=diff == --- tomcat/trunk/webapps/docs/config/context.xml (original) +++ tomcat/trunk/webapps/docs/config/context.xml Tue Sep 9 14:58:10 2014 @@ -641,7 +641,7 @@ If true and an sun.net.www.http.HttpClient keep-alive timer thread has been started by this web application and is still running, Tomcat will change the context class loader for that -thread from the web application class loader to the the parentof the web +thread from the web application class loader to the the parent of the web application class loader to prevent a memory leak. Note that the keep-alive timer thread will stop on its own once the keep-alives all expire however, on a busy system that might not happen for some time. If Modified: tomcat/trunk/webapps/docs/config/loader.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/loader.xml?rev=1623839&r1=1623838&r2=1623839&view=diff == --- tomcat/trunk/webapps/docs/config/loader.xml (original) +++ tomcat/trunk/webapps/docs/config/loader.xml Tue Sep 9 14:58:10 2014 @@ -122,10 +122,12 @@ Java class name of the java.lang.ClassLoader -implementation class to use. If not specified, the default value is -org.apache.catalina.loader.WebappClassLoader. Custom -loaderClass implementations must extend -org.apache.catalina.loader.WebappClassLoaderBase. The +implementation class to use. Custom implementations must extend +org.apache.catalina.loader.WebappClassLoaderBase. + + +If not specified, the default value is +org.apache.catalina.loader.WebappClassLoader. The default loaderClass is not parallel capable. A parallel capable loaderClass is available and can be used by specifying - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/439 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1623728 Blamelist: kfujino,markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623851 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
Author: markt Date: Tue Sep 9 15:38:16 2014 New Revision: 1623851 URL: http://svn.apache.org/r1623851 Log: Doh! Fix NPE. Note digest isn't tested for zero length anywhere else so don't introduce a test here. Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1623851&r1=1623850&r2=1623851&view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Tue Sep 9 15:38:16 2014 @@ -1200,7 +1200,7 @@ public abstract class RealmBase extends } protected boolean hasMessageDigest() { -return !(getDigest() == null && getDigest().length() > 0); +return getDigest() != null; } /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Created] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
John Gregg created MTOMCAT-278: -- Summary: Ignoring nonProxyHosts during deployment Key: MTOMCAT-278 URL: https://issues.apache.org/jira/browse/MTOMCAT-278 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: commons-lib Affects Versions: 2.3 Reporter: John Gregg Assignee: Olivier Lamy (*$^¨%`£) Attachments: nonProxyHosts.patch Deployment ignores Maven's nonProxyHosts value. If a proxy is active, deploys from one server within the proxy to another server within the proxy will use the proxy, even if the target server is in the nonProxyHosts. If the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
[ https://issues.apache.org/jira/browse/MTOMCAT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Gregg updated MTOMCAT-278: --- Attachment: nonProxyHosts.patch > Ignoring nonProxyHosts during deployment > > > Key: MTOMCAT-278 > URL: https://issues.apache.org/jira/browse/MTOMCAT-278 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib >Affects Versions: 2.3 >Reporter: John Gregg >Assignee: Olivier Lamy (*$^¨%`£) > Attachments: nonProxyHosts.patch > > > Deployment ignores Maven's nonProxyHosts value. If a proxy is active, > deploys from one server within the proxy to another server within the proxy > will use the proxy, even if the target server is in the nonProxyHosts. If > the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
[ https://issues.apache.org/jira/browse/MTOMCAT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127134#comment-14127134 ] John Gregg commented on MTOMCAT-278: Looks like MTOMCAT-177 neglected to check nonProxyHosts. > Ignoring nonProxyHosts during deployment > > > Key: MTOMCAT-278 > URL: https://issues.apache.org/jira/browse/MTOMCAT-278 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib >Affects Versions: 2.3 >Reporter: John Gregg >Assignee: Olivier Lamy (*$^¨%`£) > Attachments: nonProxyHosts.patch > > > Deployment ignores Maven's nonProxyHosts value. If a proxy is active, > deploys from one server within the proxy to another server within the proxy > will use the proxy, even if the target server is in the nonProxyHosts. If > the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 47714] Response mixed between users
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714 --- Comment #25 from Christopher Schultz --- (In reply to Ben Erridge from comment #22) > This needs to be reopened it happens daily on our production system we are > using the latest mod_jk 1.2.40 > > I also turned off all retrying and connection reuse. > > switching to mod_proxy resolves the issue. What version of Tomcat are you using? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56937] New: Allow default context to be used when deployXML=false and context.xml is in WAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=56937 Bug ID: 56937 Summary: Allow default context to be used when deployXML=false and context.xml is in WAR Product: Tomcat 7 Version: 7.0.50 Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: owen.farr...@gmail.com With the changes in r1545288, any application that comes packaged with a context.xml deployment descriptor requires a context-specific deployment descriptor be present. While I understand the desire to improve security, it still seems practical to inherit the default context. Most IDEs that integrate with Tomcat will automatically generate an empty context.xml. Some applications (like Artifactory) come with a minimalist version. Is there any way to account for both scenarios? Maybe adding a new host attribute that allows the default context to be used. Or maybe the HostConfig implementation could be improved so that only security-specific elements are accounted for. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56937] Allow default context to be used when deployXML=false and context.xml is in WAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=56937 Owen Farrell changed: What|Removed |Added CC||ma...@apache.org -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 47714] Response mixed between users
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714 --- Comment #26 from Ben Erridge --- We are using Glassfish V3.1.2.2 in production. We have the same application running in other datacenters with other Load Balancers, none have exhibited this behaviour except the one fronted by Mod_JK. I have screen shots clearly showing response mix ups. Also because glassfish sends set cookie each response users often take on the identity of other users. This was happening 14-20 times a day. We have a session origin filter which detects when sessions span request IP's but this is not always effective when many users have the same source ip. Once we switched to mod_proxy this never happens. I much prefer mod_jk to mod_proxy so I am happy to provide any details necessary to getting to the bottom of this. I did setup a test platform and make a simple JMeter test but have been unsuccessful in replicating the issue. Our production environment is much more complex than my test environment was. Also I tried to contact Olivier Schmitt who is the gentlemen who has been successful in replicating this in a test environment; But as yet he has not responded to my inquiry about his test rig. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56938] New: Applications with uppercase context paths cannot be updated
https://issues.apache.org/bugzilla/show_bug.cgi?id=56938 Bug ID: 56938 Summary: Applications with uppercase context paths cannot be updated Product: Tomcat 8 Version: 8.0.12 Hardware: PC OS: Linux Status: NEW Severity: blocker Priority: P2 Component: Manager Assignee: dev@tomcat.apache.org Reporter: austinjo...@avadynehealth.com Tomcat 8.0.12 cannot update applications with uppercase context paths if the application is deployed as a compressed WAR file. For the bug to occur, two deployments are required (let's call them v1 and v2). Deployment v1 goes through fine. Both the WAR and unpacked directory are updated. Deployment v2 succeeds, but the application continues to serve v1. The webapps WAR file is updated, but the unpacked app directory is not. I traced the issue to HostConfig.java line 1226: 1225: String docBase = context.getDocBase(); 1226: docBase = docBase.toLowerCase(Locale.ENGLISH); 1227: if (!docBase.endsWith(".war")) { ... 1234: ExpandWar.delete(docBaseFile); ... 1237: } 1238: reload(app) The lowercase context path is passed to ExpandWar.delete, so the unpacked dir is not deleted on case-sensitive filesystems. Tomcat reports a successful deployment of v2 in the Manager interface. The toLowerCase call should be moved into the if statement, or bound to a separate variable. The original case-sensitive docBase path must be passed to ExpandWar.delete. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56938] Applications with uppercase context paths cannot be updated
https://issues.apache.org/bugzilla/show_bug.cgi?id=56938 Austin Jones changed: What|Removed |Added CC||austinjones@avadynehealth.c ||om -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56937] Allow default context to be used when deployXML=false and context.xml is in WAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=56937 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED CC|ma...@apache.org| Resolution|--- |WONTFIX --- Comment #1 from Konstantin Kolinko --- Subscribing another person to automatic e-mail notifications without that person's explicit consent affects your karma quite negatively. You can always explicitly configure so that app-provided deployment descriptors were honored. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56937] Allow default context to be used when deployXML=false and context.xml is in WAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=56937 --- Comment #2 from Owen Farrell --- Mark - Sorry for the spam. I copied you on as the original implementer of the change. Konstantin - as for setting deployXml to true what if I don't want the app-provided deployment descriptor? What if I want to use my default context.xml? It seems like you've taken the management portion of container management out of the hands of the container. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623883 - /tomcat/trunk/webapps/docs/config/loader.xml
Author: kkolinko Date: Tue Sep 9 22:19:31 2014 New Revision: 1623883 URL: http://svn.apache.org/r1623883 Log: For https://issues.apache.org/bugzilla/show_bug.cgi?id=56530 Clarify what "parallel capable" means for a classloader. Modified: tomcat/trunk/webapps/docs/config/loader.xml Modified: tomcat/trunk/webapps/docs/config/loader.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/loader.xml?rev=1623883&r1=1623882&r2=1623883&view=diff == --- tomcat/trunk/webapps/docs/config/loader.xml (original) +++ tomcat/trunk/webapps/docs/config/loader.xml Tue Sep 9 22:19:31 2014 @@ -128,9 +128,10 @@ If not specified, the default value is org.apache.catalina.loader.WebappClassLoader. The -default loaderClass is not parallel capable. A parallel -capable loaderClass is available and can be used by -specifying +default loaderClass is not parallel capable, which +means that loading a class from this classloader is performed by one +thread at a time. A parallel capable loaderClass is +available and can be used by specifying org.apache.catalina.loader.ParallelWebappClassLoader. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/442 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1623883 Blamelist: kkolinko Build succeeded! sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623902 - /tomcat/trunk/webapps/docs/config/context.xml
Author: kfujino Date: Wed Sep 10 04:44:10 2014 New Revision: 1623902 URL: http://svn.apache.org/r1623902 Log: Remove unused processTlds attribute. Modified: tomcat/trunk/webapps/docs/config/context.xml Modified: tomcat/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1623902&r1=1623901&r2=1623902&view=diff == --- tomcat/trunk/webapps/docs/config/context.xml (original) +++ tomcat/trunk/webapps/docs/config/context.xml Wed Sep 10 04:44:10 2014 @@ -709,12 +709,6 @@ be used. - -Whether the context should process TLDs on startup. The default -is true. The false setting is intended for special cases -that know in advance TLDs are not part of the webapp. - - If true, when this context is stopped, Tomcat renews all the threads from the thread pool that was used to serve this context. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
[ https://issues.apache.org/jira/browse/MTOMCAT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) updated MTOMCAT-278: --- Fix Version/s: 2.3 > Ignoring nonProxyHosts during deployment > > > Key: MTOMCAT-278 > URL: https://issues.apache.org/jira/browse/MTOMCAT-278 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib >Affects Versions: 2.3 >Reporter: John Gregg >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.3 > > Attachments: nonProxyHosts.patch > > > Deployment ignores Maven's nonProxyHosts value. If a proxy is active, > deploys from one server within the proxy to another server within the proxy > will use the proxy, even if the target server is in the nonProxyHosts. If > the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623909 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Wed Sep 10 05:53:08 2014 New Revision: 1623909 URL: http://svn.apache.org/r1623909 Log: add contributor Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1623909&r1=1623908&r2=1623909&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Wed Sep 10 05:53:08 2014 @@ -194,6 +194,9 @@ Andrey Utkin + + John Gregg + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623908 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
Author: olamy Date: Wed Sep 10 05:53:01 2014 New Revision: 1623908 URL: http://svn.apache.org/r1623908 Log: [MTOMCAT-278] Ignoring nonProxyHosts during deployment Submitted by John Gregg Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1623908&r1=1623907&r2=1623908&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Sep 10 05:53:01 2014 @@ -42,6 +42,8 @@ import org.apache.http.impl.client.Defau import org.apache.http.impl.conn.PoolingClientConnectionManager; import org.apache.http.protocol.BasicHttpContext; import org.apache.maven.settings.Proxy; +import org.apache.maven.wagon.proxy.ProxyInfo; +import org.apache.maven.wagon.proxy.ProxyUtils; import java.io.File; import java.io.FileInputStream; @@ -294,15 +296,19 @@ public class TomcatManager */ private void applyProxy() { -if ( this.proxy != null ) -{ -HttpHost proxy = new HttpHost( this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol() ); -httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); -if ( this.proxy.getUsername() != null ) -{ -httpClient.getCredentialsProvider().setCredentials( -new AuthScope( this.proxy.getHost(), this.proxy.getPort() ), -new UsernamePasswordCredentials( this.proxy.getUsername(), this.proxy.getPassword() ) ); +if ( this.proxy != null ) { + +ProxyInfo proxyInfo = new ProxyInfo(); +proxyInfo.setNonProxyHosts(this.proxy.getNonProxyHosts()); + +if (!ProxyUtils.validateNonProxyHosts(proxyInfo, url.getHost())) { +HttpHost proxy = new HttpHost(this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol()); + httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); +if (this.proxy.getUsername() != null) { +httpClient.getCredentialsProvider().setCredentials( +new AuthScope(this.proxy.getHost(), this.proxy.getPort()), +new UsernamePasswordCredentials(this.proxy.getUsername(), this.proxy.getPassword())); +} } } else - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623911 - in /tomcat/maven-plugin/trunk: tomcat-maven-plugin-it/src/main/resources/simple-war-project/ tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/ tomcat6-maven-plu
Author: olamy Date: Wed Sep 10 05:53:31 2014 New Revision: 1623911 URL: http://svn.apache.org/r1623911 Log: fix war plugin Modified: tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/simple-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/pom.xml tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/simple-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/pom.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/deploy-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/simple-war-project/pom.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml Modified: tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/simple-war-project/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/simple-war-project/pom.xml?rev=1623911&r1=1623910&r2=1623911&view=diff == --- tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/simple-war-project/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/simple-war-project/pom.xml Wed Sep 10 05:53:31 2014 @@ -36,7 +36,7 @@ maven-war-plugin - 2.1-alpha-2 + 2.4 org.apache.tomcat.maven Modified: tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/pom.xml?rev=1623911&r1=1623910&r2=1623911&view=diff == --- tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/resources/tomcat-run-multi-config/pom.xml Wed Sep 10 05:53:31 2014 @@ -49,6 +49,7 @@ maven-war-plugin +2.4 src/main/webapp/web.xml Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml?rev=1623911&r1=1623910&r2=1623911&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml Wed Sep 10 05:53:31 2014 @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-war-plugin - 2.1-alpha-2 + 2.4 org.apache.maven.plugins Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml?rev=1623911&r1=1623910&r2=1623911&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml Wed Sep 10 05:53:31 2014 @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-war-plugin - 2.1-alpha-2 + 2.4 org.apache.maven.plugins Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/simple-war-project/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/simple-war-project/pom.xml?rev=1623911&r1=1623910&r2=1623911&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/simple-war-project/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/simple-war-project/pom.xml Wed Sep 10 05:53:31 2014 @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-war-plugin -
svn commit: r1623910 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Wed Sep 10 05:53:13 2014 New Revision: 1623910 URL: http://svn.apache.org/r1623910 Log: last rat plugin version Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1623910&r1=1623909&r2=1623910&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Wed Sep 10 05:53:13 2014 @@ -758,7 +758,7 @@ org.apache.rat apache-rat-plugin - 0.10 + 0.11 .gitignore - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1623912 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
Author: olamy Date: Wed Sep 10 05:53:39 2014 New Revision: 1623912 URL: http://svn.apache.org/r1623912 Log: formatting Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1623912&r1=1623911&r2=1623912&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Sep 10 05:53:39 2014 @@ -296,18 +296,21 @@ public class TomcatManager */ private void applyProxy() { -if ( this.proxy != null ) { +if ( this.proxy != null ) +{ ProxyInfo proxyInfo = new ProxyInfo(); -proxyInfo.setNonProxyHosts(this.proxy.getNonProxyHosts()); +proxyInfo.setNonProxyHosts( this.proxy.getNonProxyHosts() ); -if (!ProxyUtils.validateNonProxyHosts(proxyInfo, url.getHost())) { -HttpHost proxy = new HttpHost(this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol()); - httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); -if (this.proxy.getUsername() != null) { +if ( !ProxyUtils.validateNonProxyHosts( proxyInfo, url.getHost() ) ) +{ +HttpHost proxy = new HttpHost( this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol() ); +httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); +if ( this.proxy.getUsername() != null ) +{ httpClient.getCredentialsProvider().setCredentials( -new AuthScope(this.proxy.getHost(), this.proxy.getPort()), -new UsernamePasswordCredentials(this.proxy.getUsername(), this.proxy.getPassword())); +new AuthScope( this.proxy.getHost(), this.proxy.getPort() ), +new UsernamePasswordCredentials( this.proxy.getUsername(), this.proxy.getPassword() ) ); } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
[ https://issues.apache.org/jira/browse/MTOMCAT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-278. -- Resolution: Fixed patch applied. Thanks! > Ignoring nonProxyHosts during deployment > > > Key: MTOMCAT-278 > URL: https://issues.apache.org/jira/browse/MTOMCAT-278 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib >Affects Versions: 2.3 >Reporter: John Gregg >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.3 > > Attachments: nonProxyHosts.patch > > > Deployment ignores Maven's nonProxyHosts value. If a proxy is active, > deploys from one server within the proxy to another server within the proxy > will use the proxy, even if the target server is in the nonProxyHosts. If > the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-278) Ignoring nonProxyHosts during deployment
[ https://issues.apache.org/jira/browse/MTOMCAT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14128128#comment-14128128 ] Hudson commented on MTOMCAT-278: SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #284 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/284/]) [MTOMCAT-278] Ignoring nonProxyHosts during deployment Submitted by John Gregg (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1623908) * /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java > Ignoring nonProxyHosts during deployment > > > Key: MTOMCAT-278 > URL: https://issues.apache.org/jira/browse/MTOMCAT-278 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib >Affects Versions: 2.3 >Reporter: John Gregg >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.3 > > Attachments: nonProxyHosts.patch > > > Deployment ignores Maven's nonProxyHosts value. If a proxy is active, > deploys from one server within the proxy to another server within the proxy > will use the proxy, even if the target server is in the nonProxyHosts. If > the target server is localhost, the proxy will likely return an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org