JBossWeb SVN: r1691 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-31 10:02:29 -0400 (Thu, 31 Mar 2011)
New Revision: 1691
Added:
tags/JBOSSWEB_7_0_0_BETA8/
Log:
- Beta 8.
13 years, 9 months
JBossWeb SVN: r1690 - trunk/webapps/docs.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-31 09:48:47 -0400 (Thu, 31 Mar 2011)
New Revision: 1690
Modified:
trunk/webapps/docs/changelog.xml
Log:
- Changelog items.
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-03-30 16:35:30 UTC (rev 1689)
+++ trunk/webapps/docs/changelog.xml 2011-03-31 13:48:47 UTC (rev 1690)
@@ -16,6 +16,19 @@
<body>
+<section name="JBoss Web 7.0.0.Beta8 (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Fix APR init with a negative pollerSize. (remm)
+ </fix>
+ <fix>
+ Beautify the address string which is used as the connector name. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.0.Beta7 (remm)">
<subsection name="Catalina">
<changelog>
13 years, 9 months
JBossWeb SVN: r1689 - in trunk/java/org/apache/coyote: http11 and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-30 12:35:30 -0400 (Wed, 30 Mar 2011)
New Revision: 1689
Modified:
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
- Escape '/' in address, to beautify things.
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-03-30 16:34:56 UTC (rev 1688)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-03-30 16:35:30 UTC (rev 1689)
@@ -289,9 +289,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/', '-')) + "-";
}
return ("ajp-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2011-03-30 16:34:56 UTC (rev 1688)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2011-03-30 16:35:30 UTC (rev 1689)
@@ -266,9 +266,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/', '-')) + "-";
}
return ("ajp-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-03-30 16:34:56 UTC (rev 1688)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-03-30 16:35:30 UTC (rev 1689)
@@ -234,9 +234,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/', '-')) + "-";
}
return ("http-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2011-03-30 16:34:56 UTC (rev 1688)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2011-03-30 16:35:30 UTC (rev 1689)
@@ -280,9 +280,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/', '-')) + "-";
}
return ("http-" + encodedAddr + endpoint.getPort());
}
13 years, 9 months
JBossWeb SVN: r1688 - trunk/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-30 12:34:56 -0400 (Wed, 30 Mar 2011)
New Revision: 1688
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Fix init() logic with bad pollerSize if it is left to the default value.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2011-03-25 14:42:32 UTC (rev 1687)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2011-03-30 16:34:56 UTC (rev 1688)
@@ -1422,28 +1422,29 @@
*/
protected void init() {
- timeouts = new SocketTimeouts(pollerSize);
-
pool = Pool.create(serverSockPool);
- actualPollerSize = pollerSize;
+ int defaultPollerSize = pollerSize;
// Poller size defaults
- if (actualPollerSize <= 0) {
+ if (defaultPollerSize <= 0) {
if (org.apache.tomcat.util.Constants.LOW_MEMORY) {
if (event) {
- actualPollerSize = 128;
+ defaultPollerSize = 128;
} else {
- actualPollerSize = 1024;
+ defaultPollerSize = 1024;
}
} else {
- actualPollerSize = (OS.IS_WIN32 || OS.IS_WIN64) ? (8 * 1024) : (32 * 1024);
+ defaultPollerSize = (OS.IS_WIN32 || OS.IS_WIN64) ? (8 * 1024) : (32 * 1024);
}
}
- if ((OS.IS_WIN32 || OS.IS_WIN64) && (actualPollerSize > 1024)) {
+ if ((OS.IS_WIN32 || OS.IS_WIN64) && (defaultPollerSize > 1024)) {
// The maximum per poller to get reasonable performance is 1024
// Adjust poller size so that it won't reach the limit
- actualPollerSize = 1024;
+ defaultPollerSize = 1024;
}
-
+ actualPollerSize = defaultPollerSize;
+
+ timeouts = new SocketTimeouts(defaultPollerSize);
+
// At the moment, setting the timeout is useless, but it could get used
// again as the normal poller could be faster using maintain. It might not
// be worth bothering though.
@@ -1457,7 +1458,7 @@
pollset = allocatePoller(actualPollerSize, pool, -1);
}
- pollerCount = pollerSize / actualPollerSize;
+ pollerCount = defaultPollerSize / actualPollerSize;
pollerTime = pollTime / pollerCount;
pollers = new long[pollerCount];
@@ -1473,8 +1474,8 @@
desc = new long[actualPollerSize * 2];
connectionCount = 0;
- addList = new SocketList(pollerSize);
- localAddList = new SocketList(pollerSize);
+ addList = new SocketList(defaultPollerSize);
+ localAddList = new SocketList(defaultPollerSize);
}
13 years, 9 months
JBossWeb SVN: r1687 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-25 10:42:32 -0400 (Fri, 25 Mar 2011)
New Revision: 1687
Added:
tags/JBOSSWEB_7_0_0_BETA7/
Log:
Web beta 7, some new APIs.
13 years, 9 months
JBossWeb SVN: r1686 - in trunk: java/org/apache/catalina/connector and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-23 12:54:28 -0400 (Wed, 23 Mar 2011)
New Revision: 1686
Modified:
trunk/java/org/apache/catalina/Host.java
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/java/org/apache/catalina/core/StandardHost.java
trunk/webapps/docs/changelog.xml
Log:
- Add host filtering in the connector (easier than the rewrite valve).
- Configuration for the name of the root webapp.
Modified: trunk/java/org/apache/catalina/Host.java
===================================================================
--- trunk/java/org/apache/catalina/Host.java 2011-03-21 12:15:31 UTC (rev 1685)
+++ trunk/java/org/apache/catalina/Host.java 2011-03-23 16:54:28 UTC (rev 1686)
@@ -100,6 +100,21 @@
/**
+ * Return the default webapp name.
+ */
+ public String getDefaultWebapp();
+
+
+ /**
+ * Set the default webapp name for this Host. Defaults to "ROOT.war".
+ *
+ * @param defaultWebapp The archive name of the webapp which will be mapped
+ * as the root of the host
+ */
+ public void setDefaultWebapp(String defaultWebapp);
+
+
+ /**
* Return the canonical, fully qualified, name of the virtual host
* this Container represents.
*/
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2011-03-21 12:15:31 UTC (rev 1685)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2011-03-23 16:54:28 UTC (rev 1686)
@@ -21,6 +21,7 @@
import java.lang.reflect.Method;
import java.net.URLEncoder;
import java.util.HashMap;
+import java.util.Set;
import javax.management.MBeanRegistration;
import javax.management.MBeanServer;
@@ -261,6 +262,12 @@
*/
protected boolean useBodyEncodingForURI = false;
+
+ /**
+ * Allowed virtual hosts.
+ */
+ protected Set<String> allowedHosts = null;
+
protected static HashMap replacements = new HashMap();
static {
@@ -376,7 +383,27 @@
}
+
/**
+ * Set of allowed hosts.
+ */
+ public Set<String> getAllowedHosts() {
+
+ return allowedHosts;
+
+ }
+
+
+ /**
+ * Restrict the connector to certain hosts.
+ */
+ public void setAllowedHosts(Set<String> allowedHosts) {
+
+ this.allowedHosts = allowedHosts;
+
+ }
+
+ /**
* Is this connector available for processing requests?
*/
public boolean isAvailable() {
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2011-03-21 12:15:31 UTC (rev 1685)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2011-03-23 16:54:28 UTC (rev 1686)
@@ -536,7 +536,13 @@
res.setMessage("Context not mapped");
return false;
}
-
+ if (connector.getAllowedHosts() != null
+ && !connector.getAllowedHosts().contains(request.getMappingData().host)) {
+ res.setStatus(403);
+ res.setMessage("Host access is forbidden through this connector");
+ return false;
+ }
+
// Filter trace method
if (!connector.getAllowTrace()
&& req.method().equalsIgnoreCase("TRACE")) {
Modified: trunk/java/org/apache/catalina/core/StandardHost.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardHost.java 2011-03-21 12:15:31 UTC (rev 1685)
+++ trunk/java/org/apache/catalina/core/StandardHost.java 2011-03-23 16:54:28 UTC (rev 1686)
@@ -85,6 +85,12 @@
/**
+ * The default webapp name.
+ */
+ private String defaultWebapp = "ROOT";
+
+
+ /**
* The Java class name of the default context configuration class
* for deployed web applications.
*/
@@ -154,6 +160,22 @@
}
+ public String getDefaultWebapp() {
+
+ return (this.defaultWebapp);
+
+ }
+
+
+ public void setDefaultWebapp(String defaultWebapp) {
+
+ String oldDefaultWebapp = this.defaultWebapp;
+ this.defaultWebapp = defaultWebapp;
+ support.firePropertyChange("defaultWebapp", oldDefaultWebapp, this.defaultWebapp);
+
+ }
+
+
/**
* Return the Java class name of the context configuration class
* for new web applications.
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-03-21 12:15:31 UTC (rev 1685)
+++ trunk/webapps/docs/changelog.xml 2011-03-23 16:54:28 UTC (rev 1686)
@@ -16,6 +16,19 @@
<body>
+<section name="JBoss Web 7.0.0.Beta7 (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <update>
+ Add a host filtering feature in the connectors. (remm)
+ </update>
+ <update>
+ Add root webapp configuration in Host. (remm)
+ </update>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.0.Beta6 (remm)">
<subsection name="General">
<changelog>
13 years, 9 months
JBossWeb SVN: r1685 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-03-21 08:15:31 -0400 (Mon, 21 Mar 2011)
New Revision: 1685
Added:
tags/JBOSSWEB_7_0_0_BETA6/
Log:
Beta6.
13 years, 9 months
JBossWeb SVN: r1684 - in branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: dehort
Date: 2011-03-18 11:10:05 -0400 (Fri, 18 Mar 2011)
New Revision: 1684
Modified:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/webapps/docs/changelog.xml
Log:
back porting patch for JBPAPP-6139
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2011-03-18 14:55:17 UTC (rev 1683)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2011-03-18 15:10:05 UTC (rev 1684)
@@ -51,6 +51,7 @@
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSessionContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
@@ -152,40 +153,24 @@
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
- if (!allowUnsafeLegacyRenegotiation) {
- asock.addHandshakeCompletedListener(
- new DisableSslRenegotiation());
- }
- configureClientAuth(asock);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
- private static class DisableSslRenegotiation
- implements HandshakeCompletedListener {
- private volatile boolean completed = false;
+ public void handshake(Socket sock) throws IOException {
+ // We do getSession instead of startHandshake() so we can call this multiple times
+ SSLSession session = ((SSLSocket)sock).getSession();
+ if (session.getCipherSuite().equals("SSL_NULL_WITH_NULL_NULL"))
+ throw new IOException("SSL handshake failed. Ciper suite in SSL Session is SSL_NULL_WITH_NULL_NULL");
- public void handshakeCompleted(HandshakeCompletedEvent event) {
- if (completed) {
- try {
- log.warn("SSL renegotiation is disabled, closing connection");
- event.getSession().invalidate();
- event.getSocket().close();
- } catch (IOException e) {
- // ignore
- }
- }
- completed = true;
+ if (!allowUnsafeLegacyRenegotiation) {
+ // Prevent futher handshakes by removing all cipher suites
+ ((SSLSocket) sock).setEnabledCipherSuites(new String[0]);
}
}
-
- public void handshake(Socket sock) throws IOException {
- ((SSLSocket)sock).startHandshake();
- }
-
/*
* Determines the SSL cipher suites to be enabled.
*
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2011-03-18 14:55:17 UTC (rev 1683)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2011-03-18 15:10:05 UTC (rev 1684)
@@ -148,6 +148,15 @@
ssl.setNeedClientAuth(true);
}
+ if (ssl.getEnabledCipherSuites().length == 0) {
+ // Handshake is never going to be successful.
+ // Assume this is because handshakes are disabled
+ log.warn("SSL server initiated renegotiation is disabled, closing connection");
+ session.invalidate();
+ ssl.close();
+ return;
+ }
+
InputStream in = ssl.getInputStream();
int oldTimeout = ssl.getSoTimeout();
ssl.setSoTimeout(1000);
@@ -170,10 +179,7 @@
break;
}
}
- // If legacy re-negotiation is disabled, socked could be closed here
- if (!ssl.isClosed()) {
- ssl.setSoTimeout(oldTimeout);
- }
+ ssl.setSoTimeout(oldTimeout);
if (listener.completed == false) {
throw new SocketException("SSL Cert handshake timeout");
}
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/webapps/docs/changelog.xml
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/webapps/docs/changelog.xml 2011-03-18 14:55:17 UTC (rev 1683)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/webapps/docs/changelog.xml 2011-03-18 15:10:05 UTC (rev 1684)
@@ -15,6 +15,15 @@
</properties>
<body>
+<section name="JBoss Web 2.1.11.GA (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>JBPAPP-5293</jboss-jira>: ConcurrentModificationException in HandshakeCompletedNotify-Thread. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
<section name="JBoss Web 2.1.7.GA (remm)">
<subsection name="Coyote">
13 years, 9 months
JBossWeb SVN: r1683 - branches.
by jbossweb-commits@lists.jboss.org
Author: dehort
Date: 2011-03-18 10:55:17 -0400 (Fri, 18 Mar 2011)
New Revision: 1683
Added:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6139/
Log:
Creating a branch for JBPAPP-6139
13 years, 9 months
JBossWeb SVN: r1682 - in branches/2.1.x: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-03-17 05:05:19 -0400 (Thu, 17 Mar 2011)
New Revision: 1682
Modified:
branches/2.1.x/java/org/apache/catalina/valves/AccessLogValve.java
branches/2.1.x/webapps/docs/changelog.xml
Log:
For case 00434276.
Modified: branches/2.1.x/java/org/apache/catalina/valves/AccessLogValve.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/valves/AccessLogValve.java 2011-03-16 10:09:18 UTC (rev 1681)
+++ branches/2.1.x/java/org/apache/catalina/valves/AccessLogValve.java 2011-03-17 09:05:19 UTC (rev 1682)
@@ -27,7 +27,6 @@
import java.net.InetAddress;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
@@ -856,8 +855,7 @@
// Initialize the timeZone, Date formatters, and currentDate
timezone = TimeZone.getDefault();
timeZoneNoDST = calculateTimeZoneOffset(timezone.getRawOffset());
- Calendar calendar = Calendar.getInstance(timezone);
- int offset = calendar.get(Calendar.DST_OFFSET);
+ int offset = timezone.getDSTSavings();
timeZoneDST = calculateTimeZoneOffset(timezone.getRawOffset() + offset);
if (fileDateFormat == null || fileDateFormat.length() == 0)
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2011-03-16 10:09:18 UTC (rev 1681)
+++ branches/2.1.x/webapps/docs/changelog.xml 2011-03-17 09:05:19 UTC (rev 1682)
@@ -15,6 +15,16 @@
</properties>
<body>
+<section name="JBoss Web 2.1.12.GA (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>46982</bug>: Correct reporting of DST offset in access logs. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 2.1.11.GA (remm)">
<subsection name="Catalina">
<changelog>
13 years, 9 months