svn commit: r1518097 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/Tomcat.java test/org/apache/catalina/startup/TestTomcat.java webapps/docs/changelog.xml
Author: violetagg Date: Wed Aug 28 08:12:46 2013 New Revision: 1518097 URL: http://svn.apache.org/r1518097 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51526 Merged revision 1517941 from tomcat/trunk: o.a.catalina.startup.Tomcat.addWebapp(...) will process web application's context.xml when it is presented in the provided baseDir. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1517941 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1518097r1=1518096r2=1518097view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java Wed Aug 28 08:12:46 2013 @@ -18,12 +18,16 @@ package org.apache.catalina.startup; import java.io.File; import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; import java.security.Principal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Stack; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; import java.util.logging.Level; import java.util.logging.Logger; @@ -187,13 +191,15 @@ public class Tomcat { hostname = s; } -/** - * Add a webapp using normal WEB-INF/web.xml if found. - * - * @param contextPath - * @param baseDir - * @return new Context - * @throws ServletException +/** + * This is equivalent to adding a web application to Tomcatapos;s webapps + * directory. The equivalent of the default web.xml will be applied to the + * web application and any WEB-INF/web.xml and META-INF/context.xml packaged + * with the application will be processed normally. Normal web fragment and + * {@link javax.servlet.ServletContainerInitializer} processing will be + * applied. + * + * @throws ServletException */ public Context addWebapp(String contextPath, String baseDir) throws ServletException { @@ -529,7 +535,8 @@ public class Tomcat { ctx.setDocBase(path); ctx.addLifecycleListener(new DefaultWebXmlListener()); - +ctx.setConfigFile(getWebappConfigFile(path, url)); + ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); @@ -676,16 +683,20 @@ public class Tomcat { } private void silence(Host host, String ctx) { -String base = org.apache.catalina.core.ContainerBase.[default].[; +Logger.getLogger(getLoggerName(host, ctx)).setLevel(Level.WARNING); +} + +private String getLoggerName(Host host, String ctx) { +String loggerName = org.apache.catalina.core.ContainerBase.[default].[; if (host == null) { -base += getHost().getName(); +loggerName += getHost().getName(); } else { -base += host.getName(); +loggerName += host.getName(); } -base += ].[; -base += ctx; -base += ]; -Logger.getLogger(base).setLevel(Level.WARNING); +loggerName += ].[; +loggerName += ctx; +loggerName += ]; +return loggerName; } /** @@ -1054,4 +1065,52 @@ public class Tomcat { z, application/x-compress, zip, application/zip }; + +protected URL getWebappConfigFile(String path, String url) { +File docBase = new File(path); +if (docBase.isDirectory()) { +return getWebappConfigFileFromDirectory(docBase, url); +} else { +return getWebappConfigFileFromJar(docBase, url); +} +} + +private URL getWebappConfigFileFromDirectory(File docBase, String url) { +URL result = null; +File webAppContextXml = new File(docBase, Constants.ApplicationContextXml); +if (webAppContextXml.exists()) { +try { +result = webAppContextXml.toURI().toURL(); +} catch (MalformedURLException e) { +Logger.getLogger(getLoggerName(getHost(), url)).log(Level.WARNING, +Unable to determine web application context.xml + docBase, e); +} +} +return result; +} + +private URL getWebappConfigFileFromJar(File docBase, String url) { +URL result = null; +JarFile jar = null; +try { +jar = new JarFile(docBase); +
[Bug 51526] Process web application context config with embedded Tomcat.addWebApp(...)
https://issues.apache.org/bugzilla/show_bug.cgi?id=51526 Violeta Georgieva violet...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Violeta Georgieva violet...@apache.org --- The feature is in trunk and 7.0.x and will be included in 8.0.0-RC2 and 7.0.43 onwards. -- 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: r1518101 - in /tomcat/tc7.0.x/trunk/test/deployment: ./ context.war dirContext/ dirContext/META-INF/ dirContext/META-INF/context.xml dirContext/index.html dirNoContext/ dirNoContext/index.
Author: violetagg Date: Wed Aug 28 08:24:10 2013 New Revision: 1518101 URL: http://svn.apache.org/r1518101 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51526 Added missing test resources. Added: tomcat/tc7.0.x/trunk/test/deployment/ (with props) tomcat/tc7.0.x/trunk/test/deployment/context.war (with props) tomcat/tc7.0.x/trunk/test/deployment/dirContext/ (with props) tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/ (with props) tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/context.xml (with props) tomcat/tc7.0.x/trunk/test/deployment/dirContext/index.html (with props) tomcat/tc7.0.x/trunk/test/deployment/dirNoContext/ (with props) tomcat/tc7.0.x/trunk/test/deployment/dirNoContext/index.html (with props) tomcat/tc7.0.x/trunk/test/deployment/noContext.war (with props) Propchange: tomcat/tc7.0.x/trunk/test/deployment/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/trunk/test/deployment/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/trunk/test/deployment/ -- --- bugtraq:message (added) +++ bugtraq:message Wed Aug 28 08:24:10 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/trunk/test/deployment/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Added: tomcat/tc7.0.x/trunk/test/deployment/context.war URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/deployment/context.war?rev=1518101view=auto == Binary file - no diff available. Propchange: tomcat/tc7.0.x/trunk/test/deployment/context.war -- svn:mime-type = application/octet-stream Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/ -- --- bugtraq:message (added) +++ bugtraq:message Wed Aug 28 08:24:10 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/ -- --- bugtraq:message (added) +++ bugtraq:message Wed Aug 28 08:24:10 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Added: tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/context.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/context.xml?rev=1518101view=auto == --- tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/context.xml (added) +++ tomcat/tc7.0.x/trunk/test/deployment/dirContext/META-INF/context.xml Wed Aug 28 08:24:10 2013 @@ -0,0 +1,17 @@ +!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the License); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an AS IS BASIS,
[jira] [Created] (MTOMCAT-235) War file is being uploaded twice - Cookie rejected
George Smith created MTOMCAT-235: Summary: War file is being uploaded twice - Cookie rejected Key: MTOMCAT-235 URL: https://issues.apache.org/jira/browse/MTOMCAT-235 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat6 Affects Versions: 2.1 Environment: Linux Reporter: George Smith Assignee: Olivier Lamy (*$^¨%`£) When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server, which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /manager-okin-udrzbar//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-235) War file is being uploaded twice - Cookie rejected
[ https://issues.apache.org/jira/browse/MTOMCAT-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] George Smith updated MTOMCAT-235: - Description: When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server, which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /server-app//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. was: When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server, which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /manager-okin-udrzbar//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. War file is being uploaded twice - Cookie rejected --- Key: MTOMCAT-235 URL: https://issues.apache.org/jira/browse/MTOMCAT-235 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat6 Affects Versions: 2.1 Environment: Linux Reporter: George Smith Assignee: Olivier Lamy (*$^¨%`£) When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server, which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /server-app//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-235) War file is being uploaded twice - Cookie rejected
[ https://issues.apache.org/jira/browse/MTOMCAT-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] George Smith updated MTOMCAT-235: - Description: When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server (from security reasons), which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /server-app//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. The htaccess file content: {code} RewriteEngine On RewriteRule ^manager-server-app/(.*)$ ajp://localhost:8010/manager/$1 [P,NE] RewriteRule ^manager-server-app$ /manager/ [L,R] {code} was: When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server, which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /server-app//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. War file is being uploaded twice - Cookie rejected --- Key: MTOMCAT-235 URL: https://issues.apache.org/jira/browse/MTOMCAT-235 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat6 Affects Versions: 2.1 Environment: Linux Reporter: George Smith Assignee: Olivier Lamy (*$^¨%`£) When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path. In front of Tomcat there is a Apache server (from security reasons), which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it. {code} [INFO] Deploying war to http://192.168.191.83/server-app Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 468.1 KB/sec) 28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: [version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]. Illegal path attribute /manager. Path of origin: /server-app//deploy Uploading: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app Uploaded: http://192.168.191.83/manager-server-app//deploy?path=%2Fserver-app (13788 KB at 332.8 KB/sec) {code} After second automatic upload it's deployed successfully. The htaccess file content: {code} RewriteEngine On RewriteRule ^manager-server-app/(.*)$ ajp://localhost:8010/manager/$1 [P,NE] RewriteRule ^manager-server-app$ /manager/ [L,R] {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - 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-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1369 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1518097 Blamelist: violetagg BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1518113 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: markt Date: Wed Aug 28 09:08:54 2013 New Revision: 1518113 URL: http://svn.apache.org/r1518113 Log: Fix typo Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518113r1=1518112r2=1518113view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 09:08:54 2013 @@ -629,7 +629,7 @@ public class InternalAprInputBuffer exte return 0; } else if (-nRead == Status.TIMEUP) { // Attempting to read from the socket when the poller has not -// signaled that there is data to read appears to behave like a +// signalled that there is data to read appears to behave like a // blocking read with a short timeout on OSX rather than like a // non-blocking read. If no data is read, treat the resulting // timeout like a non-blocking read that returned no data. - 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-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1370 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1518101 Blamelist: violetagg 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: r1518128 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Author: markt Date: Wed Aug 28 09:58:54 2013 New Revision: 1518128 URL: http://svn.apache.org/r1518128 Log: Simplify. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1518128r1=1518127r2=1518128view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Wed Aug 28 09:58:54 2013 @@ -163,7 +163,7 @@ public class InternalNioInputBuffer exte return available; } -available = Math.max(lastValid - pos, 0); +available = lastValid - pos; if (available0) { return available; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518133 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Author: markt Date: Wed Aug 28 10:06:53 2013 New Revision: 1518133 URL: http://svn.apache.org/r1518133 Log: Remove code that duplicates code in super.available() which is called immediately before the duplicate code. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1518133r1=1518132r2=1518133view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Wed Aug 28 10:06:53 2013 @@ -163,10 +163,6 @@ public class InternalNioInputBuffer exte return available; } -available = lastValid - pos; -if (available0) { -return available; -} try { available = nbRead(); }catch (IOException ioe) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518135 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java
Author: markt Date: Wed Aug 28 10:09:48 2013 New Revision: 1518135 URL: http://svn.apache.org/r1518135 Log: Rename loal variable prior to some refactoring. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1518135r1=1518134r2=1518135view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Wed Aug 28 10:09:48 2013 @@ -334,13 +334,13 @@ public abstract class AbstractInputBuffe * correspond). */ public int available() { -int result = (lastValid - pos); -if ((result == 0) (lastActiveFilter = 0)) { -for (int i = 0; (result == 0) (i = lastActiveFilter); i++) { -result = activeFilters[i].available(); +int available = lastValid - pos; +if ((available == 0) (lastActiveFilter = 0)) { +for (int i = 0; (available == 0) (i = lastActiveFilter); i++) { +available = activeFilters[i].available(); } } -return result; +return available; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518143 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractInputBuffer.java InternalAprInputBuffer.java InternalInputBuffer.java InternalNioInputBuffer.java
Author: markt Date: Wed Aug 28 10:17:00 2013 New Revision: 1518143 URL: http://svn.apache.org/r1518143 Log: Refactoring. Make the log instance available to the super class. Use imports rather than fully-qualified names. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1518143r1=1518142r2=1518143view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Wed Aug 28 10:17:00 2013 @@ -20,6 +20,7 @@ import java.io.IOException; import org.apache.coyote.InputBuffer; import org.apache.coyote.Request; +import org.apache.juli.logging.Log; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.tomcat.util.net.AbstractEndpoint; @@ -249,6 +250,8 @@ public abstract class AbstractInputBuffe */ protected abstract int nbRead() throws IOException; +protected abstract Log getLog(); + // - Public Methods Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518143r1=1518142r2=1518143view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:17:00 2013 @@ -641,6 +641,12 @@ public class InternalAprInputBuffer exte } +@Override +protected final Log getLog() { +return log; +} + + private int doReadSocket(boolean block) { Lock readLock = wrapper.getBlockingStatusReadLock(); Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java?rev=1518143r1=1518142r2=1518143view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Wed Aug 28 10:17:00 2013 @@ -561,6 +561,12 @@ public class InternalInputBuffer extends } +@Override +protected final Log getLog() { +return log; +} + + // - InputStreamInputBuffer Inner Class /** Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1518143r1=1518142r2=1518143view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Wed Aug 28 10:17:00 2013 @@ -23,6 +23,8 @@ import java.nio.charset.StandardCharsets import org.apache.coyote.InputBuffer; import org.apache.coyote.Request; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.net.AbstractEndpoint; @@ -40,8 +42,8 @@ import org.apache.tomcat.util.net.Socket */ public class InternalNioInputBuffer extends AbstractInputBufferNioChannel { -private static final org.apache.juli.logging.Log log = - org.apache.juli.logging.LogFactory.getLog(InternalNioInputBuffer.class); +private static final Log log = +LogFactory.getLog(InternalNioInputBuffer.class); // -- Constants @@ -184,6 +186,12 @@ public class InternalNioInputBuffer exte } +@Override +protected final Log getLog() { +return log; +} + + /** * Recycle the input buffer. This should be called when closing the * connection. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518144 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractInputBuffer.java InternalNioInputBuffer.java
Author: markt Date: Wed Aug 28 10:20:21 2013 New Revision: 1518144 URL: http://svn.apache.org/r1518144 Log: Refactoring. Pull up code from NIO that also does a non-blocking read in the available() call. This makes NIO and APR consistent. BIO is unaffected as it overrides available() and always returns 1. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1518144r1=1518143r2=1518144view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Wed Aug 28 10:20:21 2013 @@ -343,6 +343,21 @@ public abstract class AbstractInputBuffe available = activeFilters[i].available(); } } +if (available 0) { +return available; +} + +try { +available = nbRead(); +} catch (IOException ioe) { +if (getLog().isDebugEnabled()) { +getLog().debug(sm.getString(iib.available.readFail), ioe); +} +// Not ideal. This will indicate that data is available which should +// trigger a read which in turn will trigger another IOException and +// that one can be thrown. +available = 1; +} return available; } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1518144r1=1518143r2=1518144view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Wed Aug 28 10:20:21 2013 @@ -158,29 +158,6 @@ public class InternalNioInputBuffer exte // - Public Methods @Override -public int available() { - -int available = super.available(); -if (available0) { -return available; -} - -try { -available = nbRead(); -}catch (IOException ioe) { -if (log.isDebugEnabled()) { -log.debug(sm.getString(iib.available.readFail), ioe); -} -// Not ideal. This will indicate that data is available which should -// trigger a read which in turn will trigger another IOException and -// that one can be thrown. -available = 1; -} -return available; -} - - -@Override public int nbRead() throws IOException { return readSocket(true,false); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518147 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
Author: markt Date: Wed Aug 28 10:23:52 2013 New Revision: 1518147 URL: http://svn.apache.org/r1518147 Log: Remove unnecessary code. inputBuffer.avaiable() now includes a call to nbRead() to check for available data if the buffer is empty. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1518147r1=1518146r2=1518147view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Wed Aug 28 10:23:52 2013 @@ -1585,16 +1585,8 @@ public abstract class AbstractHttp11Proc } else if (status == SocketStatus.OPEN_READ request.getReadListener() != null) { try { -try { -if (inputBuffer.available() 0 || inputBuffer.nbRead() 0) { -asyncStateMachine.asyncOperation(); -} -} catch (IOException x) { -if (getLog().isDebugEnabled()) { -getLog().debug(Unable to read async data.,x); -} -status = SocketStatus.ASYNC_READ_ERROR; -request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, x); +if (inputBuffer.available() 0) { +asyncStateMachine.asyncOperation(); } } catch (IllegalStateException x) { registerForEvent(true, false); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518153 - in /tomcat/trunk/java/org/apache/coyote/http11: InternalAprInputBuffer.java LocalStrings.properties
Author: markt Date: Wed Aug 28 10:43:16 2013 New Revision: 1518153 URL: http://svn.apache.org/r1518153 Log: Fix some broken exception messages. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518153r1=1518152r2=1518153view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:43:16 2013 @@ -600,12 +600,13 @@ public class InternalAprInputBuffer exte lastValid = pos + nRead; } else { if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { -throw new SocketTimeoutException(sm.getString(iib.failedread)); +throw new SocketTimeoutException(sm.getString(iib.readtimeout)); } else if (nRead == 0) { // APR_STATUS_IS_EOF, since native 1.1.22 return false; } else { -throw new IOException(sm.getString(iib.failedread)); +throw new IOException(sm.getString(iib.failedread.apr, +Integer.valueOf(-nRead))); } } Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1518153r1=1518152r2=1518153view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Wed Aug 28 10:43:16 2013 @@ -34,6 +34,7 @@ iib.filter.npe=You may not add a null fi iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 2616 and has been ignored. iib.invalidmethod=Invalid character (CR or LF) found in method name iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer not recycled? +iib.readtimeout=Timeout attempting to read data from the socket iib.requestheadertoolarge.error=Request header is too large iib.socketClosed=The socket has been closed in another thread - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518154 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: markt Date: Wed Aug 28 10:45:05 2013 New Revision: 1518154 URL: http://svn.apache.org/r1518154 Log: Handle non-standard OSX behaviour on non-blocking reads that return no data in fill() as well as nbRead() Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518154r1=1518153r2=1518154view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:45:05 2013 @@ -600,7 +600,18 @@ public class InternalAprInputBuffer exte lastValid = pos + nRead; } else { if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { -throw new SocketTimeoutException(sm.getString(iib.readtimeout)); +if (block) { +throw new SocketTimeoutException( +sm.getString(iib.readtimeout)); +} else { +// Attempting to read from the socket when the poller +// has not signalled that there is data to read appears +// to behave like a blocking read with a short timeout +// on OSX rather than like a non-blocking read. If no +// data is read, treat the resulting timeout like a +// non-blocking read that returned no data. +return false; +} } else if (nRead == 0) { // APR_STATUS_IS_EOF, since native 1.1.22 return false; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518155 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: markt Date: Wed Aug 28 10:51:20 2013 New Revision: 1518155 URL: http://svn.apache.org/r1518155 Log: Simplify nested if statements Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518155r1=1518154r2=1518155view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:51:20 2013 @@ -598,29 +598,26 @@ public class InternalAprInputBuffer exte bbuf.limit(nRead); bbuf.get(buf, pos, nRead); lastValid = pos + nRead; -} else { -if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { -if (block) { -throw new SocketTimeoutException( -sm.getString(iib.readtimeout)); -} else { -// Attempting to read from the socket when the poller -// has not signalled that there is data to read appears -// to behave like a blocking read with a short timeout -// on OSX rather than like a non-blocking read. If no -// data is read, treat the resulting timeout like a -// non-blocking read that returned no data. -return false; -} -} else if (nRead == 0) { -// APR_STATUS_IS_EOF, since native 1.1.22 -return false; +} else if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { +if (block) { +throw new SocketTimeoutException( +sm.getString(iib.readtimeout)); } else { -throw new IOException(sm.getString(iib.failedread.apr, -Integer.valueOf(-nRead))); +// Attempting to read from the socket when the poller +// has not signalled that there is data to read appears +// to behave like a blocking read with a short timeout +// on OSX rather than like a non-blocking read. If no +// data is read, treat the resulting timeout like a +// non-blocking read that returned no data. +return false; } +} else if (nRead == 0) { +// APR_STATUS_IS_EOF, since native 1.1.22 +return false; +} else { +throw new IOException(sm.getString(iib.failedread.apr, +Integer.valueOf(-nRead))); } - } return (nRead 0); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518156 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: markt Date: Wed Aug 28 10:52:13 2013 New Revision: 1518156 URL: http://svn.apache.org/r1518156 Log: Handle EAGAIN return code (expected for non-blocking reads when no data is available) Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518156r1=1518155r2=1518156view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:52:13 2013 @@ -598,6 +598,8 @@ public class InternalAprInputBuffer exte bbuf.limit(nRead); bbuf.get(buf, pos, nRead); lastValid = pos + nRead; +} else if (-nRead == Status.EAGAIN) { +return false; } else if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { if (block) { throw new SocketTimeoutException( - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518158 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractInputBuffer.java InternalAprInputBuffer.java InternalInputBuffer.java InternalNioInputBuffer.java
Author: markt Date: Wed Aug 28 10:58:05 2013 New Revision: 1518158 URL: http://svn.apache.org/r1518158 Log: Remove nbRead(). Calls to available() now trigger a call of fill(false) (i.e. non-blocking). This avoids a problem observed on the users list where repeated calls to available() in turn triggered calls to nbRead() that resulted in the buffer being expanded as nbRead() didn't reset pos and lastValid when adding data to what was essentially an empty buffer. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1518158r1=1518157r2=1518158view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Wed Aug 28 10:58:05 2013 @@ -244,12 +244,6 @@ public abstract class AbstractInputBuffe protected abstract void init(SocketWrapperS socketWrapper, AbstractEndpoint endpoint) throws IOException; -/** - * Issues a non blocking read. - * @return int Number of bytes read - */ -protected abstract int nbRead() throws IOException; - protected abstract Log getLog(); @@ -348,7 +342,8 @@ public abstract class AbstractInputBuffe } try { -available = nbRead(); +fill(false); +available = lastValid - pos; } catch (IOException ioe) { if (getLog().isDebugEnabled()) { getLog().debug(sm.getString(iib.available.readFail), ioe); Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1518158r1=1518157r2=1518158view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Wed Aug 28 10:58:05 2013 @@ -627,32 +627,6 @@ public class InternalAprInputBuffer exte @Override -protected int nbRead() throws IOException { -bbuf.clear(); -int nRead = doReadSocket(false); - -if (nRead 0) { -bbuf.limit(nRead); -bbuf.get(buf, pos, nRead); -lastValid = pos + nRead; -return nRead; -} else if (-nRead == Status.EAGAIN) { -return 0; -} else if (-nRead == Status.TIMEUP) { -// Attempting to read from the socket when the poller has not -// signalled that there is data to read appears to behave like a -// blocking read with a short timeout on OSX rather than like a -// non-blocking read. If no data is read, treat the resulting -// timeout like a non-blocking read that returned no data. -return 0; -} else { -throw new IOException(sm.getString(iib.failedread.apr, -Integer.valueOf(-nRead))); -} -} - - -@Override protected final Log getLog() { return log; } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java?rev=1518158r1=1518157r2=1518158view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Wed Aug 28 10:58:05 2013 @@ -553,15 +553,6 @@ public class InternalInputBuffer extends @Override -protected int nbRead() throws IOException { -// If this gets called for BIO need to make caller think there is data -// to read as BIO always reads whether there is data or not (and blocks -// until there is data to read). -return 1; -} - - -@Override protected final Log getLog() { return log; } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1518158r1=1518157r2=1518158view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
[Tomcat Wiki] Update of ContributorsGroup by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on Tomcat Wiki for change notification. The ContributorsGroup page has been changed by markt: https://wiki.apache.org/tomcat/ContributorsGroup?action=diffrev1=9rev2=10 Comment: += GFUCyrusAG * NevenCvetkovic * ShawnYu * DmytroMrachkovskyi + * GFUCyrusAG - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55493] New: How to configure OCSP with tomcat and how to test once it's setup
https://issues.apache.org/bugzilla/show_bug.cgi?id=55493 Bug ID: 55493 Summary: How to configure OCSP with tomcat and how to test once it's setup Product: Tomcat 7 Version: 7.0.40 Hardware: DEC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Examples Assignee: dev@tomcat.apache.org Reporter: skp.hp...@gmail.com How to configure OCSP with tomcat and how to test once it's setup. -- 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
Re: svn commit: r1504148 - in /tomcat/trunk: java/org/apache/jasper/compiler/ java/org/apache/jasper/el/ java/org/apache/jasper/runtime/ test/javax/el/ test/org/apache/el/ test/org/apache/el/parser/ t
On Wed, 2013-07-17 at 14:14 +, ma...@apache.org wrote: Author: markt Date: Wed Jul 17 14:14:28 2013 New Revision: 1504148 URL: http://svn.apache.org/r1504148 Log: Add the two new resolver types (stream and static) to Jasper in the correct order and modify JasperELResolver so the correct resolvers are skipped. -public static ELResolver getDefaultResolver() { +public static ELResolver getDefaultResolver(ExpressionFactory factory) { if (Constants.IS_SECURITY_ENABLED) { CompositeELResolver defaultResolver = new CompositeELResolver(); -// TODO ExpressionFactory.getStreamELResolver() -// TODO javax.el.StaticFieldResolver +defaultResolver.add(factory.getStreamELResolver()); +defaultResolver.add(new StaticFieldELResolver()); defaultResolver.add(new MapELResolver()); defaultResolver.add(new ResourceBundleELResolver()); defaultResolver.add(new ListELResolver()); I see one issue: in most cases (= no security manager), the static cache resolver instance is used, and it doesn't have the two new resolvers. The new stream EL resolver for the collections seems to be more difficult to use with the caching strategy as well, but it looks possible. Ideas ? Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55493] How to configure OCSP with tomcat and how to test once it's setup
https://issues.apache.org/bugzilla/show_bug.cgi?id=55493 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas ma...@apache.org --- Bugzilla is not a support forum. Please use the Tomcat users mailing list. -- 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: r1518178 - /tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
Author: markt Date: Wed Aug 28 12:36:16 2013 New Revision: 1518178 URL: http://svn.apache.org/r1518178 Log: Better comment Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518178r1=1518177r2=1518178view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Aug 28 12:36:16 2013 @@ -198,7 +198,7 @@ public abstract class AbstractAjpProcess /** - * Body empty flag. + * Request body empty flag. */ protected boolean empty = true; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader
On Aug 21, 2013, at 6:21 PM, bugzi...@apache.org wrote: https://issues.apache.org/bugzilla/show_bug.cgi?id=55317 Nick Williams nicho...@nicholaswilliams.net changed: What|Removed |Added Attachment #30748|0 |1 is obsolete|| --- Comment #15 from Nick Williams nicho...@nicholaswilliams.net --- Created attachment 30749 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30749action=edit Proposed implementation of this feature Can I get some feedback on the patch I submitted last week? It comes with 10 unit tests and passes all check style checks. Thanks, Nick - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55494] New: JNDIRealm throws exception after timeout / Connection reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Bug ID: 55494 Summary: JNDIRealm throws exception after timeout / Connection reset Product: Tomcat 7 Version: 7.0.41 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: thomas.hoffm...@speed4trade.com Our tomcat is configured to use Windows 2012 AD with JNDI-Realm When the application is running for some hours, the Tomcat logs exceptions because of timeouts. Here is a stacktrace: WARNING: Exception performing authentication javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; remaining name 'xxx' at com.sun.jndi.ldap.LdapCtx.doSearch(Unknown Source) at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source) at javax.naming.directory.InitialDirContext.search(Unknown Source) at org.apache.catalina.realm.JNDIRealm.getUserBySearch(JNDIRealm.java:1438) at org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:1289) at org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:1225) at org.apache.catalina.realm.JNDIRealm.getPrincipal(JNDIRealm.java:2086) at org.apache.catalina.realm.JNDIRealm.getPrincipal(JNDIRealm.java:2005) at org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:523) at org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:295) at org.apache.catalina.realm.LockOutRealm.authenticate(LockOutRealm.java:249) at org.apache.catalina.authenticator.SpnegoAuthenticator.authenticate(SpnegoAuthenticator.java:250) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:341) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.jndi.ldap.Connection.run(Unknown Source) ... 1 more It seems that the LDAP-Lookup tries to search for the user within LDAP but the server already closed the Connection. Looks like this cause: http://stackoverflow.com/questions/10911897/tomcat-7-0-14-ldap-authentication -- 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 55494] JNDIRealm throws exception after timeout / Connection reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Thomas Hoffmann thomas.hoffm...@speed4trade.com changed: What|Removed |Added OS||All --- Comment #1 from Thomas Hoffmann thomas.hoffm...@speed4trade.com --- Here is our configuration (some values are censored): Realm className=org.apache.catalina.realm.JNDIRealm connectionName=cn=xxx connectionPassword=xxx adCompat=true allRolesMode =authOnly connectionTimeout=3000 connectionURL=ldap://srv1:389; alternateURL=ldap://srv2:389; userBase=ou=xxx userSearch=(sAMAccountName={0}) userSubtree=true roleSubtree=true roleBase=ou=xxx roleName=cn roleSearch=(member={0}) / -- 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: r1518189 - in /tomcat/trunk: java/org/apache/coyote/ajp/AbstractAjpProcessor.java test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
Author: markt Date: Wed Aug 28 13:01:03 2013 New Revision: 1518189 URL: http://svn.apache.org/r1518189 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55453 Do not return a response body for those status codes and request methods that do not permit one. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518189r1=1518188r2=1518189view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Aug 28 13:01:03 2013 @@ -216,6 +216,12 @@ public abstract class AbstractAjpProcess /** + * Should any response body be swallowed and not sent to the client. + */ +private boolean swallowResponse = false; + + +/** * Finished response. */ protected boolean finished = false; @@ -563,6 +569,7 @@ public abstract class AbstractAjpProcess request.recycle(); response.recycle(); certificates.recycle(); +swallowResponse = false; bytesWritten = 0; } @@ -937,8 +944,25 @@ public abstract class AbstractAjpProcess responseMessage.reset(); responseMessage.appendByte(Constants.JK_AJP13_SEND_HEADERS); +// Responses with certain status codes are not permitted to include a +// response body. +int statusCode = response.getStatus(); +if (statusCode 200 || statusCode == 204 || statusCode == 205 || +statusCode == 304) { +// No entity body +swallowResponse = true; +} + +// Responses to HEAD requests are not permitted to incude a response +// body. +MessageBytes methodMB = request.method(); +if (methodMB.equals(HEAD)) { +// No entity body +swallowResponse = true; +} + // HTTP header contents -responseMessage.appendInt(response.getStatus()); +responseMessage.appendInt(statusCode); String message = null; if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER HttpMessages.isSafeInHttpHeader(response.getMessage())) { @@ -1103,27 +1127,29 @@ public abstract class AbstractAjpProcess } } -int len = chunk.getLength(); -// 4 - hardcoded, byte[] marshaling overhead -// Adjust allowed size if packetSize != default (Constants.MAX_PACKET_SIZE) -int chunkSize = Constants.MAX_SEND_SIZE + packetSize - Constants.MAX_PACKET_SIZE; -int off = 0; -while (len 0) { -int thisTime = len; -if (thisTime chunkSize) { -thisTime = chunkSize; -} -len -= thisTime; -responseMessage.reset(); -responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK); -responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime); -responseMessage.end(); -output(responseMessage.getBuffer(), 0, responseMessage.getLen()); +if (!swallowResponse) { +int len = chunk.getLength(); +// 4 - hardcoded, byte[] marshaling overhead +// Adjust allowed size if packetSize != default (Constants.MAX_PACKET_SIZE) +int chunkSize = Constants.MAX_SEND_SIZE + packetSize - Constants.MAX_PACKET_SIZE; +int off = 0; +while (len 0) { +int thisTime = len; +if (thisTime chunkSize) { +thisTime = chunkSize; +} +len -= thisTime; +responseMessage.reset(); + responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK); +responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime); +responseMessage.end(); +output(responseMessage.getBuffer(), 0, responseMessage.getLen()); + +off += thisTime; +} -off += thisTime; +bytesWritten += chunk.getLength(); } - -bytesWritten += chunk.getLength(); return chunk.getLength(); } Modified: tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1518189r1=1518188r2=1518189view=diff
[Bug 55494] JNDIRealm throws exception after timeout / Connection reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 --- Comment #2 from Mark Thomas ma...@apache.org --- This bug report only contains statements of fact. It does not identify what the problem is. Arguably, a valid warning is being logged. There is no clear issue that needs addressing. A bug report needs to include at least one of: - what happened that you did not expect to happen - what didn't happen that you expected to happen -- 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: r1518195 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java
Author: markt Date: Wed Aug 28 13:11:12 2013 New Revision: 1518195 URL: http://svn.apache.org/r1518195 Log: Fix import order Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1518195r1=1518194r2=1518195view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java Wed Aug 28 13:11:12 2013 @@ -46,11 +46,11 @@ import static org.junit.Assert.assertTru import org.junit.Test; +import org.apache.catalina.core.StandardContext; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResourceLink; import org.apache.catalina.realm.GenericPrincipal; import org.apache.catalina.realm.RealmBase; -import org.apache.catalina.core.StandardContext; import org.apache.tomcat.util.buf.ByteChunk; public class TestTomcat extends TomcatBaseTest { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518194 - in /tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp: SimpleAjpClient.java TestAbstractAjpProcessor.java TesterAjpMessage.java
Author: markt Date: Wed Aug 28 13:10:49 2013 New Revision: 1518194 URL: http://svn.apache.org/r1518194 Log: Extend the AJP test client to support methods other than GET and implement a simple POST test. Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TesterAjpMessage.java Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java?rev=1518194r1=1518193r2=1518194view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java Wed Aug 28 13:10:49 2013 @@ -67,6 +67,11 @@ public class SimpleAjpClient { * Create a message to request the given URL. */ public TesterAjpMessage createForwardMessage(String url) { +return createForwardMessage(url, 2); +} + +public TesterAjpMessage createForwardMessage(String url, int method) { + TesterAjpMessage message = new TesterAjpMessage(AJP_PACKET_SIZE); message.reset(); @@ -78,7 +83,7 @@ public class SimpleAjpClient { message.appendByte(Constants.JK_AJP13_FORWARD_REQUEST); // HTTP method, GET = 2 -message.appendByte(0x02); +message.appendByte(method); // Protocol message.appendString(http); @@ -101,26 +106,44 @@ public class SimpleAjpClient { // Is ssl message.appendByte(0x00); -// No other headers or attributes -message.appendInt(0); +return message; +} -// Terminator -message.appendByte(0xFF); -// End the message and set the length +public TesterAjpMessage createBodyMessage(byte[] data) { + +TesterAjpMessage message = new TesterAjpMessage(AJP_PACKET_SIZE); +message.reset(); + +// Set the header bytes +message.getBuffer()[0] = 0x12; +message.getBuffer()[1] = 0x34; + +message.appendBytes(data, 0, data.length); message.end(); return message; } + /** * Sends an TesterAjpMessage to the server and returns the response message. */ -public TesterAjpMessage sendMessage(TesterAjpMessage message) +public TesterAjpMessage sendMessage(TesterAjpMessage headers) throws IOException { -// Send the message +return sendMessage(headers, null); +} + +public TesterAjpMessage sendMessage(TesterAjpMessage headers, +TesterAjpMessage body) throws IOException { +// Send the headers socket.getOutputStream().write( -message.getBuffer(), 0, message.getLen()); +headers.getBuffer(), 0, headers.getLen()); +if (body != null) { +// Send the body of present +socket.getOutputStream().write( +body.getBuffer(), 0, body.getLen()); +} // Read the response return readMessage(); } Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1518194r1=1518193r2=1518194view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Wed Aug 28 13:10:49 2013 @@ -16,11 +16,12 @@ */ package org.apache.coyote.ajp; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import java.io.File; +import org.junit.Assert; import org.junit.Test; +import org.apache.catalina.Context; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; @@ -56,8 +57,7 @@ public class TestAbstractAjpProcessor ex tomcat.start(); // Must have a real docBase - just use temp -org.apache.catalina.Context ctx = -tomcat.addContext(, System.getProperty(java.io.tmpdir)); +Context ctx = tomcat.addContext(, System.getProperty(java.io.tmpdir)); Tomcat.addServlet(ctx, helloWorld, new HelloWorldServlet()); ctx.addServletMapping(/, helloWorld); @@ -70,6 +70,8 @@ public class TestAbstractAjpProcessor ex validateCpong(ajpClient.cping()); TesterAjpMessage forwardMessage = ajpClient.createForwardMessage(/); +// Complete the message - no extra headers required. +forwardMessage.end(); // Two requests for (int i = 0; i 2; i++) { @@ -90,6 +92,51 @@ public class TestAbstractAjpProcessor
svn commit: r1518197 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/Request.java java/org/apache/coyote/ajp/AbstractAjpProcessor.java webapps/docs/changelog.xml
Author: markt Date: Wed Aug 28 13:17:12 2013 New Revision: 1518197 URL: http://svn.apache.org/r1518197 Log: Content length is managed internally as a long. Fix a few places that were unnecessarily restricting it to an int. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1517898,1517970 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java?rev=1518197r1=1518196r2=1518197view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java Wed Aug 28 13:17:12 2013 @@ -272,7 +272,7 @@ public final class Request { } -public void setContentLength(int len) { +public void setContentLength(long len) { this.contentLength = len; } Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518197r1=1518196r2=1518197view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Aug 28 13:17:12 2013 @@ -707,9 +707,7 @@ public abstract class AbstractAjpProcess if (hId == Constants.SC_REQ_CONTENT_LENGTH || (hId == -1 tmpMB.equalsIgnoreCase(Content-Length))) { // just read the content-length header, so set it -long cl = vMB.getLong(); -if(cl Integer.MAX_VALUE) -request.setContentLength( (int)cl ); +request.setContentLength(vMB.getLong()); } else if (hId == Constants.SC_REQ_CONTENT_TYPE || (hId == -1 tmpMB.equalsIgnoreCase(Content-Type))) { // just read the content-type header, so set it 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=1518197r1=1518196r2=1518197view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 28 13:17:12 2013 @@ -176,6 +176,11 @@ APR/native and HTTP APR/native connectors no longer support multiple poller threads. Both connectors now use a single poller thread. (markt) /update + fix +Internally, content length is managed as a codelong/code. Fix a few +places in the AJP connector where this was restricted to an +codeint/code. (markt) + /fix /changelog /subsection subsection name=Jasper - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518198 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
Author: markt Date: Wed Aug 28 13:18:38 2013 New Revision: 1518198 URL: http://svn.apache.org/r1518198 Log: Fix comment Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1517980 Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java?rev=1518198r1=1518197r2=1518198view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java Wed Aug 28 13:18:38 2013 @@ -198,7 +198,7 @@ public class TestChunkedInputFilter exte client.connect(); client.processRequest(); // Expected to fail because the trailers are longer -// than the default limit of 8Kb +// than the set limit of 10 bytes assertTrue(client.isResponse500()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1518199 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/ajp/AbstractAjpProcessor.java test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java webapps/docs/changelog.xml
Author: markt Date: Wed Aug 28 13:22:13 2013 New Revision: 1518199 URL: http://svn.apache.org/r1518199 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55453 Do not return a response body for those status codes and request methods that do not permit one. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1518189 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518199r1=1518198r2=1518199view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Aug 28 13:22:13 2013 @@ -215,6 +215,12 @@ public abstract class AbstractAjpProcess /** + * Should any response body be swallowed and not sent to the client. + */ +private boolean swallowResponse = false; + + +/** * Finished response. */ protected boolean finished = false; @@ -582,6 +588,7 @@ public abstract class AbstractAjpProcess request.recycle(); response.recycle(); certificates.recycle(); +swallowResponse = false; bytesWritten = 0; } @@ -959,8 +966,25 @@ public abstract class AbstractAjpProcess responseMessage.reset(); responseMessage.appendByte(Constants.JK_AJP13_SEND_HEADERS); +// Responses with certain status codes are not permitted to include a +// response body. +int statusCode = response.getStatus(); +if (statusCode 200 || statusCode == 204 || statusCode == 205 || +statusCode == 304) { +// No entity body +swallowResponse = true; +} + +// Responses to HEAD requests are not permitted to incude a response +// body. +MessageBytes methodMB = request.method(); +if (methodMB.equals(HEAD)) { +// No entity body +swallowResponse = true; +} + // HTTP header contents -responseMessage.appendInt(response.getStatus()); +responseMessage.appendInt(statusCode); String message = null; if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER HttpMessages.isSafeInHttpHeader(response.getMessage())) { @@ -1125,27 +1149,29 @@ public abstract class AbstractAjpProcess } } -int len = chunk.getLength(); -// 4 - hardcoded, byte[] marshaling overhead -// Adjust allowed size if packetSize != default (Constants.MAX_PACKET_SIZE) -int chunkSize = Constants.MAX_SEND_SIZE + packetSize - Constants.MAX_PACKET_SIZE; -int off = 0; -while (len 0) { -int thisTime = len; -if (thisTime chunkSize) { -thisTime = chunkSize; -} -len -= thisTime; -responseMessage.reset(); -responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK); -responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime); -responseMessage.end(); -output(responseMessage.getBuffer(), 0, responseMessage.getLen()); +if (!swallowResponse) { +int len = chunk.getLength(); +// 4 - hardcoded, byte[] marshaling overhead +// Adjust allowed size if packetSize != default (Constants.MAX_PACKET_SIZE) +int chunkSize = Constants.MAX_SEND_SIZE + packetSize - Constants.MAX_PACKET_SIZE; +int off = 0; +while (len 0) { +int thisTime = len; +if (thisTime chunkSize) { +thisTime = chunkSize; +} +len -= thisTime; +responseMessage.reset(); + responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK); +responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime); +responseMessage.end(); +output(responseMessage.getBuffer(), 0, responseMessage.getLen()); + +off += thisTime; +} -off += thisTime; +bytesWritten += chunk.getLength(); } - -bytesWritten += chunk.getLength(); return chunk.getLength();
[Bug 55453] AJP send Body with Status 304
https://issues.apache.org/bugzilla/show_bug.cgi?id=55453 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Mark Thomas ma...@apache.org --- Thanks for the report. This has been fixed in 7.0.x and trunk and will be included in 8.0.0-RC2 and 7.0.43 onwards. -- 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 55494] JNDIRealm throws exception after timeout / Connection reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 --- Comment #3 from Thomas Hoffmann thomas.hoffm...@speed4trade.com --- Thanks for your comment! I assumed that some users failed to logon because of this error. According to the code in JNDIRealm.java, Tomcat will try once more after encoutering the above error. Maybe it would be an improvement to change the wording, e.g. failed to authenticate... trying again... or something like that. Thank you for your quick reply! -- 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: r1518210 - in /tomcat/trunk/java/org/apache/catalina/realm: JNDIRealm.java LocalStrings.properties
Author: markt Date: Wed Aug 28 14:02:50 2013 New Revision: 1518210 URL: http://svn.apache.org/r1518210 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Reduce log level of exception messages that are logged for re-tries. Make clear in the message that a retry is taking place. Modified: tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java tomcat/trunk/java/org/apache/catalina/realm/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1518210r1=1518209r2=1518210view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java Wed Aug 28 14:02:50 2013 @@ -1028,7 +1028,7 @@ public class JNDIRealm extends RealmBase with broken SSL */ // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -1043,7 +1043,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -1058,7 +1058,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -1987,7 +1987,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -2002,7 +2002,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -2122,7 +2122,7 @@ public class JNDIRealm extends RealmBase connectionAttempt = 1; // log the first exception. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // Try connecting to the alternate url. context = new InitialDirContext(getDirectoryContextEnvironment()); Modified: tomcat/trunk/java/org/apache/catalina/realm/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/LocalStrings.properties?rev=1518210r1=1518209r2=1518210view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/realm/LocalStrings.properties Wed Aug 28 14:02:50 2013 @@ -44,6 +44,7 @@ jndiRealm.authenticateFailure=Username { jndiRealm.authenticateSuccess=Username {0} successfully authenticated jndiRealm.close=Exception closing directory server connection jndiRealm.exception=Exception performing authentication +jndiRealm.exception.retry=Exception performing authentication. Retrying... jndiRealm.open=Exception opening directory server connection memoryRealm.authenticateFailure=Username {0} NOT successfully authenticated memoryRealm.authenticateSuccess=Username {0} successfully authenticated - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-92) Bind tomcat to a self-chosen network interface
[ https://issues.apache.org/jira/browse/MTOMCAT-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13752414#comment-13752414 ] Daniel Cassidy commented on MTOMCAT-92: --- It's precisely because tomcat-maven-plugin is used during development that it is important to bind to the loopback interface only. To do otherwise exposes development code to the network and is a security risk. Binding to loopback only ought to have been the default. Bind tomcat to a self-chosen network interface -- Key: MTOMCAT-92 URL: https://issues.apache.org/jira/browse/MTOMCAT-92 Project: Apache Tomcat Maven Plugin Issue Type: Bug Affects Versions: 1.1 Reporter: Björn Michael Assignee: Olivier Lamy (*$^¨%`£) Fix For: backlog Tomcat is bound to 0.0.0.0 (all interfaces) by default. I feel the need to change this binding to e.g. localhost (127.0.0.1) or another interface by adding a host127.0.0.1/host to plugin configuration in pom.xml. This is often necessary for security or firewall reasons during the development of web applications. Thanks in advance. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55494] JNDIRealm throws exception after timeout / Connection reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Mark Thomas ma...@apache.org --- This has been fixed for trunk and 7.0.x and will be included in 8.0.0-RC2 onwards and 7.0.43 onwards. The log messages for connection errors where the action is automatically re-tried has been reduced from WARN to INFO and the log message makes clear that the action is being re-tried. -- 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: r1518212 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/realm/JNDIRealm.java java/org/apache/catalina/realm/LocalStrings.properties webapps/docs/changelog.xml
Author: markt Date: Wed Aug 28 14:05:19 2013 New Revision: 1518212 URL: http://svn.apache.org/r1518212 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55494 Reduce log level of exception messages that are logged for re-tries. Make clear in the message that a retry is taking place. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1518210 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1518212r1=1518211r2=1518212view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Wed Aug 28 14:05:19 2013 @@ -1048,7 +1048,7 @@ public class JNDIRealm extends RealmBase with broken SSL */ // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -1063,7 +1063,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -1078,7 +1078,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -2007,7 +2007,7 @@ public class JNDIRealm extends RealmBase } catch (CommunicationException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -2022,7 +2022,7 @@ public class JNDIRealm extends RealmBase } catch (ServiceUnavailableException e) { // log the exception so we know it's there. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // close the connection so we know it will be reopened. if (context != null) @@ -2142,7 +2142,7 @@ public class JNDIRealm extends RealmBase connectionAttempt = 1; // log the first exception. -containerLog.warn(sm.getString(jndiRealm.exception), e); +containerLog.info(sm.getString(jndiRealm.exception.retry), e); // Try connecting to the alternate url. context = new InitialDirContext(getDirectoryContextEnvironment()); Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties?rev=1518212r1=1518211r2=1518212view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/LocalStrings.properties Wed Aug 28 14:05:19 2013 @@ -56,6 +56,7 @@ jndiRealm.authenticateFailure=Username { jndiRealm.authenticateSuccess=Username {0} successfully authenticated jndiRealm.close=Exception closing directory server connection jndiRealm.exception=Exception performing authentication +jndiRealm.exception.retry=Exception performing authentication. Retrying... jndiRealm.open=Exception opening directory server connection memoryRealm.authenticateFailure=Username {0} NOT successfully authenticated memoryRealm.authenticateSuccess=Username {0} successfully authenticated Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL:
Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader
On 28/08/2013 13:36, Nick Williams wrote: On Aug 21, 2013, at 6:21 PM, bugzi...@apache.org wrote: https://issues.apache.org/bugzilla/show_bug.cgi?id=55317 Nick Williams nicho...@nicholaswilliams.net changed: What|Removed |Added Attachment #30748|0 |1 is obsolete|| --- Comment #15 from Nick Williams nicho...@nicholaswilliams.net --- Created attachment 30749 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30749action=edit Proposed implementation of this feature Can I get some feedback on the patch I submitted last week? It comes with 10 unit tests and passes all check style checks. I don't see any review of the proposed changes by anyone from Spring. Mark - 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-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1371 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1518195 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1518214 - /tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java
Author: markt Date: Wed Aug 28 14:14:09 2013 New Revision: 1518214 URL: http://svn.apache.org/r1518214 Log: Add new resolvers to default resolver (bug spotted by remm) Modified: tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java Modified: tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java?rev=1518214r1=1518213r2=1518214view=diff == --- tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java Wed Aug 28 14:14:09 2013 @@ -24,6 +24,7 @@ import javax.el.ArrayELResolver; import javax.el.BeanELResolver; import javax.el.CompositeELResolver; import javax.el.ELContext; +import javax.el.ELManager; import javax.el.ELResolver; import javax.el.ExpressionFactory; import javax.el.FunctionMapper; @@ -83,6 +84,9 @@ public final class ELContextImpl extends DefaultResolver = null; } else { DefaultResolver = new CompositeELResolver(); +((CompositeELResolver) DefaultResolver).add( +ELManager.getExpressionFactory().getStreamELResolver()); +((CompositeELResolver) DefaultResolver).add(new StaticFieldELResolver()); ((CompositeELResolver) DefaultResolver).add(new MapELResolver()); ((CompositeELResolver) DefaultResolver).add(new ResourceBundleELResolver()); ((CompositeELResolver) DefaultResolver).add(new ListELResolver()); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1504148 - in /tomcat/trunk: java/org/apache/jasper/compiler/ java/org/apache/jasper/el/ java/org/apache/jasper/runtime/ test/javax/el/ test/org/apache/el/ test/org/apache/el/parser/ t
On 28/08/2013 13:00, Remy Maucherat wrote: On Wed, 2013-07-17 at 14:14 +, ma...@apache.org wrote: Author: markt Date: Wed Jul 17 14:14:28 2013 New Revision: 1504148 URL: http://svn.apache.org/r1504148 Log: Add the two new resolver types (stream and static) to Jasper in the correct order and modify JasperELResolver so the correct resolvers are skipped. -public static ELResolver getDefaultResolver() { +public static ELResolver getDefaultResolver(ExpressionFactory factory) { if (Constants.IS_SECURITY_ENABLED) { CompositeELResolver defaultResolver = new CompositeELResolver(); -// TODO ExpressionFactory.getStreamELResolver() -// TODO javax.el.StaticFieldResolver +defaultResolver.add(factory.getStreamELResolver()); +defaultResolver.add(new StaticFieldELResolver()); defaultResolver.add(new MapELResolver()); defaultResolver.add(new ResourceBundleELResolver()); defaultResolver.add(new ListELResolver()); I see one issue: in most cases (= no security manager), the static cache resolver instance is used, and it doesn't have the two new resolvers. The new stream EL resolver for the collections seems to be more difficult to use with the caching strategy as well, but it looks possible. Ideas ? I think I have fixed the immediate issue. Do you see any further problems with the new code? Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Bug 55317] Facilitate weaving by allowing ClassFileTransformer to be added to WebppClassLoader
On Aug 28, 2013, at 9:07 AM, Mark Thomas wrote: On 28/08/2013 13:36, Nick Williams wrote: On Aug 21, 2013, at 6:21 PM, bugzi...@apache.org wrote: https://issues.apache.org/bugzilla/show_bug.cgi?id=55317 Nick Williams nicho...@nicholaswilliams.net changed: What|Removed |Added Attachment #30748|0 |1 is obsolete|| --- Comment #15 from Nick Williams nicho...@nicholaswilliams.net --- Created attachment 30749 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30749action=edit Proposed implementation of this feature Can I get some feedback on the patch I submitted last week? It comes with 10 unit tests and passes all check style checks. I don't see any review of the proposed changes by anyone from Spring. Yep. I'm trying to get Juergen to take a look at it, which he said he would, but sometimes he can take a few weeks to respond to things. He's a very busy guy. I was hoping for a review from some Tomcat folks in the meantime, in case there's something that I need to correct that I can take care of before Juergen gets around to reviewing it. Nick smime.p7s Description: S/MIME cryptographic signature
svn commit: r1518215 - /tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
Author: markt Date: Wed Aug 28 14:23:37 2013 New Revision: 1518215 URL: http://svn.apache.org/r1518215 Log: Fix back-ported test. Webapp location in 7.0.x is slightly different. Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1518215r1=1518214r2=1518215view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Wed Aug 28 14:23:37 2013 @@ -105,7 +105,7 @@ public class TestAbstractAjpProcessor ex Tomcat tomcat = getTomcatInstance(); // Use the normal Tomcat ROOT context -File root = new File(test/webapp); +File root = new File(test/webapp-3.0); tomcat.addWebapp(, root.getAbsolutePath()); tomcat.start(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55477] Add a solution to map an realm name to a security role
https://issues.apache.org/bugzilla/show_bug.cgi?id=55477 --- Comment #5 from Christopher Schultz ch...@christopherschultz.net --- I'm not sure I understand your statement. Can you explain further? -- 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 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #18 from Christopher Schultz ch...@christopherschultz.net --- Re: XHTML (or application/xml), I think it's reasonable to clean-up our documentation such that the documents would pass an XHTML validator, so that when the day comes to make the switch, we just switch the content-type and associated META tags, etc. My experience is that MSIE 8 and 9 don't completely choke on XML documents, but it does force the browser into compliance-mode which is definitely nice (e.g. sane box model, etc.). Mark: is there anywhere online we can see a sample of the newly-formatted documentation, or do we have to build it from svn? -- 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: r1518225 - /tomcat/native/branches/1.1.x/native/src/network.c
Author: schultz Date: Wed Aug 28 14:52:00 2013 New Revision: 1518225 URL: http://svn.apache.org/r1518225 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51813 Add NULL-checking for s-net to avoid SIGSEGV in situations where it appears a socket has been recycled. Modified: tomcat/native/branches/1.1.x/native/src/network.c Modified: tomcat/native/branches/1.1.x/native/src/network.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/network.c?rev=1518225r1=1518224r2=1518225view=diff == --- tomcat/native/branches/1.1.x/native/src/network.c (original) +++ tomcat/native/branches/1.1.x/native/src/network.c Wed Aug 28 14:52:00 2013 @@ -439,6 +439,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, send)(T return -(jint)APR_ENOTSOCK; } TCN_ASSERT(s-opaque != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} #ifdef TCN_DO_STATISTICS sp_max_send = TCN_MAX(sp_max_send, nbytes); sp_min_send = TCN_MIN(sp_min_send, nbytes); @@ -515,6 +519,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendb)( } TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(buf != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} #ifdef TCN_DO_STATISTICS sp_max_send = TCN_MAX(sp_max_send, nbytes); sp_min_send = TCN_MIN(sp_min_send, nbytes); @@ -555,6 +563,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendib) } TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(buf != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} #ifdef TCN_DO_STATISTICS sp_max_send = TCN_MAX(sp_max_send, nbytes); sp_min_send = TCN_MIN(sp_min_send, nbytes); @@ -589,6 +601,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendbb) } TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(s-jsbbuff != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} #ifdef TCN_DO_STATISTICS sp_max_send = TCN_MAX(sp_max_send, nbytes); sp_min_send = TCN_MIN(sp_min_send, nbytes); @@ -625,6 +641,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendibb } TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(s-jsbbuff != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} #ifdef TCN_DO_STATISTICS sp_max_send = TCN_MAX(sp_max_send, nbytes); sp_min_send = TCN_MIN(sp_min_send, nbytes); @@ -656,6 +676,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendv)( UNREFERENCED(o); TCN_ASSERT(sock != 0); TCN_ASSERT(s-opaque != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} nvec = (*e)-GetArrayLength(e, bufs); if (nvec = APR_MAX_IOVEC_SIZE) @@ -726,6 +750,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recv)(T UNREFERENCED(o); TCN_ASSERT(sock != 0); TCN_ASSERT(s-opaque != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} if (toread = TCN_BUFFER_SZ) { char sb[TCN_BUFFER_SZ]; @@ -783,6 +811,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recvt)( TCN_ASSERT(sock != 0); TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(buf != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} if ((ss = (*s-net-timeout_get)(s-opaque, pt)) != APR_SUCCESS) { TCN_ERROR_WRAP(ss); @@ -855,6 +887,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recvb)( } TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(buf != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} bytes = (char *)(*e)-GetDirectBufferAddress(e, buf); TCN_ASSERT(bytes != NULL); @@ -903,6 +939,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recvbb) TCN_ASSERT(sock != 0); TCN_ASSERT(s-opaque != NULL); TCN_ASSERT(s-jrbbuff != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} ss = (*s-net-recv)(s-opaque, s-jrbbuff + offset, nbytes); #ifdef TCN_DO_STATISTICS @@ -954,6 +994,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recvbt) } TCN_ASSERT(buf != NULL); TCN_ASSERT(s-opaque != NULL); +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +} bytes = (char *)(*e)-GetDirectBufferAddress(e, buf); TCN_ASSERT(bytes != NULL); @@ -1023,7 +1067,10 @@ TCN_IMPLEMENT_CALL(jint, Socket, recvbbt } TCN_ASSERT(s-jrbbuff != NULL); TCN_ASSERT(s-opaque != NULL); - +if(!s-net) { +tcn_ThrowAPRException(e, APR_EINVALSOCK); +return -(jint)APR_EINVALSOCK; +}
[Bug 51813] Tomcat randomly crashes with [libtcnative-1.so.1+0x152ca] Java_org_apache_tomcat_jni_Socket_sendbb+0x5a
https://issues.apache.org/bugzilla/show_bug.cgi?id=51813 Christopher Schultz ch...@christopherschultz.net changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #11 from Christopher Schultz ch...@christopherschultz.net --- Fixed in 1.1.x in r1518225, will be available in tcnative-1.1.28. Note that I did not add further checking for s-net-send and/or s-net-recv. Please re-open if it appears that will be necessary. -- 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 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #19 from Mark Thomas ma...@apache.org --- The CI system makes the latest build of the docs available to view: http://ci.apache.org/projects/tomcat/tomcat8/docs/ -- 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
Re: svn commit: r1518214 - /tomcat/trunk/java/org/apache/jasper/el/ELContextImpl.java
On Wed, 2013-08-28 at 14:14 +, ma...@apache.org wrote: Author: markt Date: Wed Aug 28 14:14:09 2013 New Revision: 1518214 URL: http://svn.apache.org/r1518214 Log: Add new resolvers to default resolver (bug spotted by remm) DefaultResolver = new CompositeELResolver(); +((CompositeELResolver) DefaultResolver).add( +ELManager.getExpressionFactory().getStreamELResolver()); +((CompositeELResolver) DefaultResolver).add(new StaticFieldELResolver()); ((CompositeELResolver) DefaultResolver).add(new MapELResolver()); ((CompositeELResolver) DefaultResolver).add(new ResourceBundleELResolver()); ((CompositeELResolver) DefaultResolver).add(new ListELResolver()); Nice. I was not sure ExpressionFactory.newInstance was a good idea (in particular, it's slow). Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Bug 55383] Improve markup and design of Tomcat's HTML pages
Mark, On 8/28/13 10:59 AM, bugzi...@apache.org wrote: https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #19 from Mark Thomas ma...@apache.org --- The CI system makes the latest build of the docs available to view: http://ci.apache.org/projects/tomcat/tomcat8/docs/ Thanks for the reference! -chris signature.asc Description: OpenPGP digital signature
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1373 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1518215 Blamelist: markt Build succeeded! sincerely, -The Buildbot
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/4888 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1518214 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[jira] [Created] (MTOMCAT-236) tomcat-maven-archetype creates project with failing test
Daniel Cassidy created MTOMCAT-236: -- Summary: tomcat-maven-archetype creates project with failing test Key: MTOMCAT-236 URL: https://issues.apache.org/jira/browse/MTOMCAT-236 Project: Apache Tomcat Maven Plugin Issue Type: Bug Affects Versions: 2.1, 2.2 Reporter: Daniel Cassidy tomcat-maven-archetype currently creates a project with a Selenium test that fails with Firefox 22 later. The test fails as follows: {code} --- Test set: fr.mypackage.webapp.test.SimpleTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.209 sec FAILURE! testSimple(fr.mypackage.webapp.test.SimpleTest) Time elapsed: 6.143 sec ERROR! com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event. at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167) at fr.mypackage.webapp.test.SimpleTest.testSimple(SimpleTest.java:42) {code} As a consequence, {{mvn install}} currently fails for the whole tomcat-maven-plugin project because, as part of the build, Maven creates and tests a project based on tomcat-maven-archetype. Tested with: * Windows 7, Firefox 22. * Lubuntu 12.04, Firefox 23. The problem appears to be fixed by selenium-server 2.35.0. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-236) tomcat-maven-archetype creates project with failing test
[ https://issues.apache.org/jira/browse/MTOMCAT-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cassidy updated MTOMCAT-236: --- Description: tomcat-maven-archetype currently creates a project with a Selenium test that fails with Firefox 22 later. The test fails as follows: --- Test set: fr.mypackage.webapp.test.SimpleTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.209 sec FAILURE! testSimple(fr.mypackage.webapp.test.SimpleTest) Time elapsed: 6.143 sec ERROR! com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event. at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167) at fr.mypackage.webapp.test.SimpleTest.testSimple(SimpleTest.java:42) As a consequence, mvn install currently fails for the whole tomcat-maven-plugin project because, as part of the build, Maven creates and tests a project based on tomcat-maven-archetype. Tested with: * Windows 7, Firefox 22. * Lubuntu 12.04, Firefox 23. The problem appears to be fixed by selenium-server 2.35.0. was: tomcat-maven-archetype currently creates a project with a Selenium test that fails with Firefox 22 later. The test fails as follows: {code} --- Test set: fr.mypackage.webapp.test.SimpleTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.209 sec FAILURE! testSimple(fr.mypackage.webapp.test.SimpleTest) Time elapsed: 6.143 sec ERROR! com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event. at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167) at fr.mypackage.webapp.test.SimpleTest.testSimple(SimpleTest.java:42) {code} As a consequence, {{mvn install}} currently fails for the whole tomcat-maven-plugin project because, as part of the build, Maven creates and tests a project based on tomcat-maven-archetype. Tested with: * Windows 7, Firefox 22. * Lubuntu 12.04, Firefox 23. The problem appears to be fixed by selenium-server 2.35.0. tomcat-maven-archetype creates project with failing test Key: MTOMCAT-236 URL: https://issues.apache.org/jira/browse/MTOMCAT-236 Project: Apache Tomcat Maven Plugin Issue Type: Bug Affects Versions: 2.1, 2.2 Reporter: Daniel Cassidy tomcat-maven-archetype currently creates a project with a Selenium test that fails with Firefox 22 later. The test fails as follows: --- Test set: fr.mypackage.webapp.test.SimpleTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.209 sec FAILURE! testSimple(fr.mypackage.webapp.test.SimpleTest) Time elapsed: 6.143 sec ERROR! com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event. at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167) at fr.mypackage.webapp.test.SimpleTest.testSimple(SimpleTest.java:42) As a consequence, mvn install currently fails for the whole tomcat-maven-plugin project because, as part of the build, Maven creates and tests a project based on tomcat-maven-archetype. Tested with: *
[jira] [Commented] (MTOMCAT-236) tomcat-maven-archetype creates project with failing test
[ https://issues.apache.org/jira/browse/MTOMCAT-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13752549#comment-13752549 ] Daniel Cassidy commented on MTOMCAT-236: To fix this you can pull from this git branch: https://github.com/djcsdy/tomcat-maven-plugin/tree/MTOMCAT-236 Or apply this patch: https://gist.github.com/djcsdy/6368040/raw/996601ad8d53c8257f5d94f48232fb21066b487d/MTOMCAT-236.patch tomcat-maven-archetype creates project with failing test Key: MTOMCAT-236 URL: https://issues.apache.org/jira/browse/MTOMCAT-236 Project: Apache Tomcat Maven Plugin Issue Type: Bug Affects Versions: 2.1, 2.2 Reporter: Daniel Cassidy tomcat-maven-archetype currently creates a project with a Selenium test that fails with Firefox 22 later. The test fails as follows: --- Test set: fr.mypackage.webapp.test.SimpleTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.209 sec FAILURE! testSimple(fr.mypackage.webapp.test.SimpleTest) Time elapsed: 6.143 sec ERROR! com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event. at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167) at fr.mypackage.webapp.test.SimpleTest.testSimple(SimpleTest.java:42) As a consequence, mvn install currently fails for the whole tomcat-maven-plugin project because, as part of the build, Maven creates and tests a project based on tomcat-maven-archetype. Tested with: * Windows 7, Firefox 22. * Lubuntu 12.04, Firefox 23. The problem appears to be fixed by selenium-server 2.35.0. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55477] Add a solution to map an realm name to a security role
https://issues.apache.org/bugzilla/show_bug.cgi?id=55477 --- Comment #6 from Stefan Mayr ste...@mayr-stefan.de --- I thought about defining a custom ressource to make an inline configuration possible without messing with the Digester rules. So I searched and found http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Adding_Custom_Resource_Factories If I understand this correct each attribute in the xml-Element resource will be accessible by my resource object (com.mycompany.MyBean). e.g. From the example: Resource name=bean/MyBeanFactory auth=Container type=com.mycompany.MyBean factory=com.mycompany.MyBeanFactory bar=23/ here we can access to bar and its value 23. Some more google searches later I found collection elements in spring beans: http://static.springsource.org/spring/docs/1.2.9/reference/beans.html#beans-collection-elements . There the bean attributes are configured using sub xml elements. But I cannot find tomcat examples where some sort of collection is written as attribute value (like bar={collection-element-1}{collection-element-2}) in the server.xml. I doubt this is even possible. So I'm again with an external file, messing with strings or the digester rules. Sorry if this is all a bit twisted. For me as a sysadmin programming is a not so easy -- 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: r1518328 - in /tomcat/trunk: java/javax/el/LocalStrings.properties java/javax/el/Util.java java/org/apache/el/parser/AstValue.java java/org/apache/el/util/ReflectionUtil.java test/javax/el
Author: markt Date: Wed Aug 28 19:02:39 2013 New Revision: 1518328 URL: http://svn.apache.org/r1518328 Log: Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 This fixes calling overloaded methods and aligns the method matching code in the API and the implementation. Unfortunately, this has required a fair amount of duplication. I don't see a way to avoid this, short of an el-util JAR that both depend on. Added: tomcat/trunk/test/javax/el/TestUtil.java (with props) Modified: tomcat/trunk/java/javax/el/LocalStrings.properties tomcat/trunk/java/javax/el/Util.java tomcat/trunk/java/org/apache/el/parser/AstValue.java tomcat/trunk/java/org/apache/el/util/ReflectionUtil.java Modified: tomcat/trunk/java/javax/el/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/LocalStrings.properties?rev=1518328r1=1518327r2=1518328view=diff == --- tomcat/trunk/java/javax/el/LocalStrings.properties (original) +++ tomcat/trunk/java/javax/el/LocalStrings.properties Wed Aug 28 19:02:39 2013 @@ -45,4 +45,7 @@ lambdaExpression.tooFewArgs=Only [{0}] a staticFieldELResolver.methodNotFound=No matching public static method named [{0}] found on class [{1}] staticFieldELResolver.notFound=No public static field named [{0}] was found on class [{1}] -staticFieldELResolver.notWriteable=Writing to static fields (in this case field [{0}] on class [{1}]) is not permitted \ No newline at end of file +staticFieldELResolver.notWriteable=Writing to static fields (in this case field [{0}] on class [{1}]) is not permitted + +util.method.notfound=Method not found: {0}.{1}({2}) +util.method.ambiguous=Unable to find unambiguous method: {0}.{1}({2}) Modified: tomcat/trunk/java/javax/el/Util.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/Util.java?rev=1518328r1=1518327r2=1518328view=diff == --- tomcat/trunk/java/javax/el/Util.java (original) +++ tomcat/trunk/java/javax/el/Util.java Wed Aug 28 19:02:39 2013 @@ -22,9 +22,12 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.text.MessageFormat; +import java.util.HashMap; import java.util.Locale; +import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.locks.Lock; @@ -185,48 +188,311 @@ class Util { } +/* + * This class duplicates code in org.apache.el.util.ReflectionUtil. When + * making changes keep the code in sync. + */ +@SuppressWarnings(null) static Method findMethod(Class? clazz, String methodName, -Class?[] paramTypes, Object[] params) { +Class?[] paramTypes, Object[] paramValues) { -Method matchingMethod = null; +if (clazz == null || methodName == null) { +throw new MethodNotFoundException( +message(null, util.method.notfound, clazz, methodName, +paramString(paramTypes))); +} -if (paramTypes != null) { -try { -matchingMethod = -getMethod(clazz, clazz.getMethod(methodName, paramTypes)); -} catch (NoSuchMethodException e) { -throw new MethodNotFoundException(e); -} +int paramCount; +if (paramTypes == null) { +paramTypes = getTypesFromValues(paramValues); +} + +if (paramTypes == null) { +paramCount = 0; } else { -int paramCount = 0; -if (params != null) { -paramCount = params.length; +paramCount = paramTypes.length; +} + +Method[] methods = clazz.getMethods(); +MapMethod,Integer candidates = new HashMap(); + +for (Method m : methods) { +if (!m.getName().equals(methodName)) { +// Method name doesn't match +continue; } -Method[] methods = clazz.getMethods(); -for (Method m : methods) { -if (methodName.equals(m.getName())) { -if (m.getParameterTypes().length == paramCount) { -// Same number of parameters - use the first match -matchingMethod = getMethod(clazz, m); + +Class?[] mParamTypes = m.getParameterTypes(); +int mParamCount; +if (mParamTypes == null) { +mParamCount = 0; +} else { +mParamCount = mParamTypes.length; +} + +// Check the number of parameters +if (!(paramCount == mParamCount || +(m.isVarArgs()
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/4889 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1518328 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55483] ELException when object has overloaded methods
https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Mark Thomas ma...@apache.org --- Thanks for the report and the unit tests. This has been fixed in trunk and will be included in 8.0.0-RC2 onwards. -- 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: r1518381 - in /tomcat/trunk: java/javax/el/Util.java test/javax/el/TestStaticFieldELResolver.java test/javax/el/TestUtil.java
Author: markt Date: Wed Aug 28 20:50:13 2013 New Revision: 1518381 URL: http://svn.apache.org/r1518381 Log: Remainder of fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 Handle overloaded consructors. As far as the constructor matching code is concerned, constructors can be treated as methods with a special name. Therefore, refactor the newly enhanced method matching code to handle methods or constructors and then use it to replace the current simplistic constructor matching. Modified: tomcat/trunk/java/javax/el/Util.java tomcat/trunk/test/javax/el/TestStaticFieldELResolver.java tomcat/trunk/test/javax/el/TestUtil.java Modified: tomcat/trunk/java/javax/el/Util.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/Util.java?rev=1518381r1=1518380r2=1518381view=diff == --- tomcat/trunk/java/javax/el/Util.java (original) +++ tomcat/trunk/java/javax/el/Util.java Wed Aug 28 20:50:13 2013 @@ -22,7 +22,9 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.MissingResourceException; @@ -189,10 +191,9 @@ class Util { /* - * This class duplicates code in org.apache.el.util.ReflectionUtil. When + * This method duplicates code in org.apache.el.util.ReflectionUtil. When * making changes keep the code in sync. */ -@SuppressWarnings(null) static Method findMethod(Class? clazz, String methodName, Class?[] paramTypes, Object[] paramValues) { @@ -202,27 +203,42 @@ class Util { paramString(paramTypes))); } -int paramCount; if (paramTypes == null) { paramTypes = getTypesFromValues(paramValues); } +Method[] methods = clazz.getMethods(); + +ListWrapper wrappers = Wrapper.wrap(methods, methodName); + +Wrapper result = findWrapper( +clazz, wrappers, methodName, paramTypes, paramValues); + +if (result == null) { +return null; +} +return getMethod(clazz, (Method) result.unWrap()); +} + +/* + * This method duplicates code in org.apache.el.util.ReflectionUtil. When + * making changes keep the code in sync. + */ +@SuppressWarnings(null) +private static Wrapper findWrapper(Class? clazz, ListWrapper wrappers, +String name, Class?[] paramTypes, Object[] paramValues) { + +MapWrapper,Integer candidates = new HashMap(); + +int paramCount; if (paramTypes == null) { paramCount = 0; } else { paramCount = paramTypes.length; } -Method[] methods = clazz.getMethods(); -MapMethod,Integer candidates = new HashMap(); - -for (Method m : methods) { -if (!m.getName().equals(methodName)) { -// Method name doesn't match -continue; -} - -Class?[] mParamTypes = m.getParameterTypes(); +for (Wrapper w : wrappers) { +Class?[] mParamTypes = w.getParameterTypes(); int mParamCount; if (mParamTypes == null) { mParamCount = 0; @@ -232,7 +248,7 @@ class Util { // Check the number of parameters if (!(paramCount == mParamCount || -(m.isVarArgs() paramCount = mParamCount))) { +(w.isVarArgs() paramCount = mParamCount))) { // Method has wrong number of parameters continue; } @@ -244,7 +260,7 @@ class Util { // Can't be null if (mParamTypes[i].equals(paramTypes[i])) { exactMatch++; -} else if (i == (mParamCount - 1) m.isVarArgs()) { +} else if (i == (mParamCount - 1) w.isVarArgs()) { Class? varType = mParamTypes[i].getComponentType(); for (int j = i; j paramCount; j++) { if (!isAssignableFrom(paramTypes[j], varType)) { @@ -281,18 +297,18 @@ class Util { // If a method is found where every parameter matches exactly, // return it if (exactMatch == paramCount) { -return getMethod(clazz, m); +return w; } -candidates.put(m, Integer.valueOf(exactMatch)); +candidates.put(w, Integer.valueOf(exactMatch)); } // Look for the method that has the highest number of parameters where // the type matches exactly int bestMatch = 0; -Method match = null; +Wrapper match = null; boolean multiple = false; -for (Map.EntryMethod,
[Bug 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #20 from Sebb s...@apache.org --- Created attachment 30778 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30778action=edit Misaligned display IE8 top -- 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 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #21 from Sebb s...@apache.org --- Created attachment 30779 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30779action=edit Misaligned display IE8 bottom -- 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 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #22 from Sebb s...@apache.org --- The display looks a bit odd in IE8 (WinXP). The images in the top row don't display correctly. The bottom row is missing the text Comments are disabled for this page at the moment. and the horizontal line below it. Also the Copyright line at the bottom is not centred. See attached screen prints. -- 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
[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 54 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on junit exists, no need to add for property hamcrest.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-trunk exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 52 mins 49 secs Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-20130829.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.1-SNAPSHOT.jar -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20130829-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20130829.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20130829-native-src.tar.gz -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/apache-commons/pool -Dcommons-dbcp.home=/ srv/gump/public/workspace/apache-commons/dbcp -Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/public/workspace/junit/dist/junit-20130829.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servle t-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat