issue_id
int64
2.03k
426k
title
stringlengths
9
251
body
stringlengths
1
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
updated_files
stringlengths
29
34.1k
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
unknown
report_datetime
unknown
46,562
Bug 46562 Reader not closed
SHTML files are locked when using windows. Closing the reader solves the problem.
resolved fixed
6ecc35d
["java/org/apache/catalina/ssi/SSIServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-09T11:06:34Z"
"2009-01-19T13:00:00Z"
46,998
Bug 46998 small fix to TaskThreadFactory
null
resolved fixed
0c48c98
["java/org/apache/tomcat/util/threads/TaskThreadFactory.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-09T09:14:40Z"
"2009-04-08T14:13:20Z"
46,997
Bug 46997 small fix to TaskQueue
null
resolved fixed
4e1c4b2
["java/org/apache/tomcat/util/threads/TaskQueue.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-09T09:13:28Z"
"2009-04-08T14:13:20Z"
46,991
Bug 46991 "Bytes received " problem
use jk module submit some data with post method ,but "Bytes received" always show zero see source file ,JkCoyoteHandler.java ,in "inovke" method public int invoke( Msg msg, MsgContext ep ) throws IOException { if( ep.isLogTimeEnabled() ) ep.setLong( MsgContext.TIMER_PRE_REQUEST, System.currentTimeMillis()); Request req=ep.getRequest(); Response res=req.getResponse(); if( log.isDebugEnabled() ) log.debug( "Invoke " + req + " " + res + " " + req.requestURI().toString()); res.setNote( epNote, ep ); ep.setStatus( MsgContext.JK_STATUS_HEAD ); RequestInfo rp = req.getRequestProcessor(); rp.setStage(Constants.STAGE_SERVICE); try { adapter.service( req, res ); } catch( Exception ex ) { log.info("Error servicing request " + req,ex); } if(ep.getStatus() != MsgContext.JK_STATUS_CLOSED) { res.finish(); } req.recycle(); req.updateCounters(); //see this line res.recycle(); ep.recycle(); if( ep.getStatus() == MsgContext.JK_STATUS_ERROR ) { return ERROR; } ep.setStatus( MsgContext.JK_STATUS_NEW ); rp.setStage(Constants.STAGE_KEEPALIVE); return OK; } the request object recycled,the "byteRead" property must be set to zero ,but at the next line ,begin to "updateCounters",this may be a bug
resolved fixed
a228c06
["java/org/apache/jk/server/JkCoyoteHandler.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T16:13:23Z"
"2009-04-08T05:53:20Z"
46,990
Bug 46990 Synchronize target can be changed midway
null
resolved fixed
f1fd999
["java/org/apache/catalina/core/StandardContext.java", "java/org/apache/catalina/core/StandardHost.java", "java/org/apache/catalina/tribes/membership/Membership.java", "java/org/apache/catalina/util/InstanceSupport.java", "java/org/apache/catalina/util/LifecycleSupport.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T16:08:42Z"
"2009-04-07T21:33:20Z"
46,988
Bug 46988 JMXAccessorTask String constants should be final
null
resolved fixed
81ebe8f
["java/org/apache/catalina/ant/jmx/JMXAccessorTask.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T15:28:08Z"
"2009-04-07T21:33:20Z"
46,986
Bug 46986 org.apache.jasper.Constants public arrays are mutable
There are various public String arrays in org.apache.jasper.Constants. Although the array variables are final, any code can change any of the array constants.
resolved fixed
f497f12
["java/org/apache/jasper/Constants.java", "java/org/apache/jasper/compiler/PageInfo.java", "java/org/apache/jasper/xmlparser/ParserUtils.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T15:25:05Z"
"2009-04-07T21:33:20Z"
46,967
Bug 46967 ManagerBase.setRandomFile error handling fix
On some platforms (z/OS for sure), the device file /dev/urandom can pass the "f.exists()" test, but throws an IOException of some kind when trying to open it. The current code in ManagerBase.setRandomFile() doesn't handle this, which results in EVERY call to getRandom() to try again and log the error "Failed to close randomIS". The following changes to the method will add proper error handling to correct this (my changes marked "// kjw") public void setRandomFile( String s ) { // as a hack, you can use a static file - and genarate the same // session ids ( good for strange debugging ) if (Globals.IS_SECURITY_ENABLED){ randomIS = (DataInputStream)AccessController.doPrivileged(new PrivilegedSetRandomFile()); } else { try{ devRandomSource=s; File f=new File( devRandomSource ); if( ! f.exists() ) return; randomIS= new DataInputStream( new FileInputStream(f)); randomIS.readLong(); if( log.isDebugEnabled() ) log.debug( "Opening " + devRandomSource ); } catch( IOException ex ) { log.debug("Error reading " + devRandomSource, ex); //kjw if (randomIS != null) { // kjw: if opened try { randomIS.close(); } catch (Exception e) { log.warn("Failed to close randomIS."); } } // kjw devRandomSource = null; // kjw: don't try again automatically randomIS=null; } } }
resolved fixed
243aa86
["java/org/apache/catalina/session/ManagerBase.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T12:59:21Z"
"2009-04-03T23:06:40Z"
46,958
Bug 46958 manager XML interface hard-coded path in XSL transformation
null
resolved fixed
a9a58fb
["java/org/apache/catalina/manager/Constants.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T11:40:08Z"
"2009-04-02T22:06:40Z"
46,933
Bug 46933 Using Java 1.5 in StringManager
null
resolved fixed
23c47da
["java/org/apache/tomcat/util/res/StringManager.java", "test/org/apache/tomcat/util/res/TestStringManager.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T11:08:17Z"
"2009-03-27T18:53:20Z"
46,982
Bug 46982 AccessLogValve reports correct time but incorrect offset following Spring DST transition.
This is a problem with AccessLogValve for tc5.5 as well as tc6.0 on all platforms. With the system clock on my linux machine (Ubuntu in my case) to just before the US time change on March 8, I started Tomcat 5.5 and see the following messages in my Tomcat access log after accessing Tomcat JSP example pages at the time of DST transition: -: - [08/Mar/2009:01:56:20 -0700] GET /jsp-examples/jsp2/simpletag/book.jsp HTTP/1.1 200 1738 1 - {http-8080-Processor24} -: - [08/Mar/2009:03:01:22 -0700] GET /jsp-examples/jsp2/tagfiles/hello.jsp HTTP/1.1 200 2213 68 - {http-8080-Processor25} Note the offset of "-0700" both before and after DST transition. Following a Tomcat restart the offset is correct: -: - [08/Mar/2009:03:19:42 -0600] GET /jsp-examples/jsp2/jspx/basic.jspx HTTP/1.1 200 1919 780 - {http-8080-Processor25} -: - [08/Mar/2009:03:19:59 -0600] GET /jsp-examples/jsp2/jspx/svgexample.html HTTP/1.1 200 2239 4 - {http-8080-Processor25} -: - [08/Mar/2009:03:19:59 -0600] GET /jsp-examples/jsp2/jspx/textRotate.jpg HTTP/1.1 200 26729 3 - {http-8080-Processor25} BTW, I ran the tzupdater before my tests: linwin01-512> java -jar tzupdater.jar -V tzupdater version 1.3.12-b01 JRE time zone data version: tzdata2009a Embedded time zone data version: tzdata2009a The problem is in the org.apache.catalina.valves.AccessLogValve which contains the following in its start method: // Initialize the timeZone, Date formatters, and currentDate timezone = TimeZone.getDefault(); timeZoneNoDST = calculateTimeZoneOffset(timezone.getRawOffset()); Calendar calendar = Calendar.getInstance(timezone); int offset = calendar.get(Calendar.DST_OFFSET); timeZoneDST = calculateTimeZoneOffset(timezone.getRawOffset()+offset); Based on what Ive seen, int offset = calendar.get(Calendar.DST_OFFSET); returns 0 when the current time is not in Daylight savings time and (for my timezone) 3600000 (60 * 60 * 1000) when the current time is in Daylight Savings. It looks like the code assumes this is always the offset for Daylight Savings for the current timezone. I have no idea if there are some locations/timezones where Daylight Savings Time does not have a 1 hour offset. Because of this, if in a non-DST time period, timeZoneDST and timeZoneNoDST are set to the same value. If in a DST time period, I believe they are set correctly so that the transition in Autumn works correctly. I think the only problem is when moving ahead in Springtime (unless the software has been running for 6 months or so which caused the offset to be set correctly).
resolved fixed
360f8eb
["java/org/apache/catalina/valves/AccessLogValve.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-04-08T10:17:59Z"
"2009-04-07T10:26:40Z"
41,606
Bug 41606 The jspInit method is called twice.
The problem is: The jspInit method is called twice. The definition is: -The JSP background compilations are enable. (In default web.xml, define checkInterval and define development false.) -Define the JSP with <servlet> and <load-on-startup> tag in web.xml. The proposing: org/apache/jasper/compiler/Compiler.java ---- public void compile(boolean compileClass, boolean jspcMode) throws FileNotFoundException, JasperException, Exception { .... if( compileClass ) { File targetFile = new File(ctxt.getClassFileName()); if (targetFile.exists()) { long targetLastModified = targetFile.lastModified(); if (jsw != null) { jsw.setServletClassLastModifiedTime(targetLastModified); } } } }// last of the method. ---- Regards, Yuichiro
resolved fixed
f36a2c4
["java/org/apache/jasper/compiler/Compiler.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-03-27T09:42:47Z"
"2007-02-14T02:26:40Z"
46,822
Bug 46822 Avoid redundant instantiations in StandardContext
null
resolved fixed
b10d9da
["java/org/apache/catalina/core/StandardContext.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-03-26T12:58:40Z"
"2009-03-09T03:40:00Z"
46,866
Bug 46866 Seed from current time is useless
fgrep -r 'new Random(System.currentTimeMillis())' . Gives 7 places where Random initialized with seed = currentTimeMillis. This is unnecessary, because better seed initialization happens in the default Random constructor.
resolved fixed
fae26ce
["java/org/apache/catalina/core/StandardServer.java", "java/org/apache/catalina/tribes/util/UUIDGenerator.java", "test/org/apache/catalina/tribes/demos/LoadTest.java", "test/org/apache/catalina/tribes/demos/MapDemo.java", "test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java", "test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java", "test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java", "test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java", "test/org/apache/catalina/tribes/test/io/TestSenderConnections.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-03-26T11:06:06Z"
"2009-03-17T00:33:20Z"
46,875
Bug 46875 CometConnectionManagerValve: concurrent access on session object when calling HttpSession.invalidate()
When calling invalidate() on an valid HttpSession object CometConnectionManagerValve methods sessionDestroy(HttpSessionEvent se) and event(Request request, Response response, CometEvent event) are called concurrently. So either a CometEvent with EventType.END and EventSubType.SESSION_END is never signaled via sessionDestroyed(...) or the HttpSession object has become invalid and the attribute holding comet requests can not be set or removed via event(...). I have configured CometConnectionManagerValve as a Valve element in context.xml and also as a Listener element in my applications web.xml. see this stacktrace 'sessionDestroy() was a bit faster': An exception or error occurred in the container during the request processing java.lang.IllegalStateException: removeAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1206) at org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1181) at org.apache.catalina.session.StandardSessionFacade.removeAttribute(StandardSessionFacade.java:140) at org.apache.catalina.valves.CometConnectionManagerValve.event(CometConnectionManagerValve.java:335) at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:179) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:200) at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:128) at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:198) at org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:750) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:653) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:637)
resolved wontfix
08f7a5f
["java/org/apache/catalina/valves/CometConnectionManagerValve.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-03-25T18:57:43Z"
"2009-03-19T05:20:00Z"
46,666
Bug 46666 Why is disableUploadTimeout and KeepAliveTimeout correlated in Http11 Connector?
In Http11Processor.java while (started && !error && keepAlive) { // Parsing the request header try { if (!disableUploadTimeout && keptAlive) { if (keepAliveTimeout > 0) { socket.setSoTimeout(keepAliveTimeout); } else if (soTimeout > 0) { socket.setSoTimeout(soTimeout); } } inputBuffer.parseRequestLine(); request.setStartTime(System.currentTimeMillis()); keptAlive = true; if (!disableUploadTimeout) { socket.setSoTimeout(timeout); } disableUploadTimeout - This flag allows the servlet container to use a different, longer connection timeout while a servlet is being executed, which in the end allows either the servlet a longer amount of time to complete its execution, or a longer timeout during data upload. If not specified, this attribute is set to "true". The code above is waiting on a new Http Request and precedes the servlet processing logic. It seems odd to me that I must set disableTimeout to false to get my keepAliveTimeout set. To set keepalivetimout, I must implicitely enable upload timeout whether I need it or not. It seems to me that the disableTimeout is unneccessary in the following line if (!disableUploadTimeout && keptAlive) { Do you agree with this? Thanks for the insight
resolved fixed
ac6369a
["java/org/apache/coyote/http11/Http11Processor.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-13T16:17:54Z"
"2009-02-04T12:20:00Z"
46,696
Bug 46696 Missing AL headers
The following files in tomcat-trunk don't have AL headers; as far as I can tell, they should: modules/jdbc-pool/sign.sh modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/StarvationTest.java
resolved fixed
3b1b7b3
["modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/StarvationTest.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-12T14:34:26Z"
"2009-02-11T13:46:40Z"
39,396
Bug 39396 OPTIONS request on directory with no default file reports an incorrect list of allowed HTTP verbs
When an "options" http request is made to Tomcat to a directory that has no default file (like index.jsp) in it, Tomcat reports a full list of allowed verbs, when in fact, most of them are NOT allowed. For example, a request to a generic img directory: OPTIONS /img/ HTTP/1.0 Cookie: JSESSIONID=C46C2E18BE95AD91828C9370CBDF0AF2 Content-Length: 0 Accept: */* Accept-Language: en-us Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1 4322; InfoPath.1) Returns: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS Content-Length: 0 Date: Mon, 24 Apr 2006 15:11:16 GMT Connection: close Which shows several destructive options available (PUT, DELETE). But a request to DELETE or PUT (correctly) returns a 403 FORBIDDEN result: DELETE /img/ HTTP/1.0 Cookie: JSESSIONID=C46C2E18BE95AD91828C9370CBDF0AF2 Content-Length: 0 Accept: */* Accept-Language: en-us Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1 4322; InfoPath.1) Returns: HTTP/1.1 403 Forbidden Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 964 Date: Mon, 24 Apr 2006 15:12:31 GMT Connection: close Because the initial OPTIONS request returns a list containing dangerous verbs, the directory will be flagged as a serious security vulnerability by most scanners (a false positive). The issue DOES NOT occur when the directory HAS a default file in it: OPTIONS /user_management/ HTTP/1.0 Cookie: JSESSIONID=C46C2E18BE95AD91828C9370CBDF0AF2 Content-Length: 0 Accept: */* Accept-Language: en-us Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1 4322; InfoPath.1) Returns: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=BC992F0C86E2BCBD0A2E5F1B3A12C50C; Path=/ Content-Type: text/html;charset=ISO-8859-1 Date: Mon, 24 Apr 2006 15:14:27 GMT Connection: close
resolved fixed
9752018
["java/org/apache/catalina/connector/RequestFacade.java", "java/org/apache/catalina/servlets/DefaultServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-09T20:13:14Z"
"2006-04-24T20:20:00Z"
38,570
Bug 38570 if docBase path contains "webapps", a backslash is inserted
null
resolved fixed
8d2b8ff
["java/org/apache/catalina/startup/ContextConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-09T19:05:44Z"
"2006-02-08T20:20:00Z"
38,553
Bug 38553 Wrong HTTP code for failed CLIENT-CERT authentication
server.xml: =========== I set clientAuth to "want" tomcat-user.xml: ================ I create a role and an user with the ssl certificate metadata web.xml: ======== For a private URL on my webseite, I create a security constraint like this one: <security-constraint> <web-resource-collection> <web-resource-name>App</web-resource-name> <url-pattern>/protected.jsp</url-pattern> </web-resource-collection> <auth-constraint> <role-name>tomcat</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <auth-method>CLIENT-CERT</auth-method> </login-config> <security-role> <role-name>tomcat</role-name> </security-role> My results: (I try to access the restricted JSP-Page) =========== 1) When there is the RIGHT client certificate in the browser keystore: it works :-) 2) When there is the WRONG client certificate I get: HTTP Status 401 - Cannot authenticate with the provided credentials (this is ok, too) 3) When there is NO client certificate I get: HTTP Status 400 - No client certificate chain in this request 400 usually stands for a bad request or bad syntax. The Bug: ======== In case 3 I expect to get HTTP Status 401.
resolved fixed
156f1ca
["java/org/apache/catalina/authenticator/SSLAuthenticator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-04T10:43:10Z"
"2006-02-07T22:06:40Z"
38,197
Bug 38197 taglib pool bug when tag is used with jsp:attribute
null
resolved fixed
2824a70
["java/org/apache/jasper/compiler/Generator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-04T10:26:28Z"
"2006-01-09T20:53:20Z"
46,606
Bug 46606 WebdavServlet
null
resolved fixed
f0bd732
["java/org/apache/catalina/servlets/WebdavServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-02-04T07:00:03Z"
"2009-01-26T11:40:00Z"
46,564
Bug 46564 .tagx files don't compile if the document and page encoding casing differs
null
resolved fixed
7d7f757
["java/org/apache/jasper/compiler/Validator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-01-30T05:30:23Z"
"2009-01-20T05:40:00Z"
46,471
Bug 46471 Compiled tag files from different tag libraries share the same package
null
resolved fixed
3aaac85
["java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java", "java/org/apache/jasper/compiler/JspUtil.java", "java/org/apache/jasper/compiler/ParserController.java", "java/org/apache/jasper/compiler/TagFileProcessor.java", "java/org/apache/jasper/compiler/TagLibraryInfoImpl.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-01-05T19:20:11Z"
"2009-01-04T20:13:20Z"
46,462
Bug 46462 JSPWiki JSP compilation prevented by org.apache.jasper.Constants.JSP_PACKAGE_NAME
null
resolved fixed
1ca03ff
["java/org/apache/jasper/servlet/JasperLoader.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2009-01-02T11:05:45Z"
"2009-01-02T01:33:20Z"
46,298
Bug 46298 JDBCRealm.open() throws NullPointerException if the specified driver doesn't handle the specified JDBC URL
null
resolved fixed
e31998a
["java/org/apache/catalina/realm/JDBCRealm.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-28T23:46:49Z"
"2008-11-26T03:26:40Z"
46,261
Bug 46261 Context with %2F in name causes tomcat crash on shutdown
Context with %2F in name causes tomcat crash on shutdown Several years ago I worked on integrating tomcat 5.5 into our web application management infrastructure. During the process I fixed several tomcat 5.5 bugs, but apparently never sent the fixes upstream. Oops. Our application needs to be deployed to create a URL that looks like this: /product/customername/servlet I worked with several people on IRC to get tomcat5.5 to do this. We had previously been using the path= parameter in the context xml file element with tomcat 4.1. Unfortunately, it appears this feature was removed from tomcat5.5, and tomcat5.5 does not recurse into subdirectories when reading .xml context files. The recommendation on IRC (after several suggestions which would not work for our environment) was to put %2F in the context xml file's name. Such as this product%2Fcustomername.xml This does work, however when you try to shutdown tomcat 6.0.18, you will get this crash: Nov 9, 2008 10:56:17 PM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8180 Nov 9, 2008 10:56:18 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Nov 9, 2008 10:56:18 PM org.apache.catalina.startup.HostConfig undeployApps WARNING: Error while removing context [/product%2Fcustomername] java.lang.NullPointerException at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:915) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1191) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1162) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:584) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671) Nov 9, 2008 10:56:18 PM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8180
resolved fixed
85fc30c
["java/org/apache/catalina/core/StandardContext.java", "java/org/apache/catalina/manager/HTMLManagerServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-26T23:50:26Z"
"2008-11-21T12:20:00Z"
46,381
Bug 46381 Coerce EL expression to java.lang.Object breaks expression concatenation
null
resolved fixed
24bcb47
["java/org/apache/jasper/compiler/Generator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-26T23:43:09Z"
"2008-12-11T12:53:20Z"
46,357
Bug 46357 FarmWarDeployer has nonsense condition
FarmWarDeployer has the following code at line 152: if(econtainer == null && econtainer instanceof Engine) { There's clearly something wrong with that condition.
resolved fixed
7e6a2ec
["java/org/apache/catalina/ha/deploy/FarmWarDeployer.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-26T23:37:33Z"
"2008-12-06T10:40:00Z"
46,397
Bug 46397 Potential memory leak with TagHandlers and JspIdConsumer
null
resolved fixed
5277185
["java/org/apache/jasper/compiler/Generator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-23T18:31:04Z"
"2008-12-15T05:46:40Z"
46,403
Bug 46403 Persistent cookies written by 6.0.18 do not work in Internet Explorer or Safari
null
resolved fixed
99c5ca6
["java/org/apache/tomcat/util/http/ServerCookie.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-23T13:14:42Z"
"2008-12-15T19:40:00Z"
46,408
Bug 46408 Invalid cast in SecurityUtil
In case of PrivilegedActionException thrown in: private static void execute(final Method method, final Object targetObject, final Object[] targetArguments, Principal principal) method, there is a false assumption in catch block, that PrivilegedActionException.getException() will return InvocationTargetException. It could be also IllegalAccessException and possibly other types of exceptions as well. Here is the stack trace provoked on catalina shutdown when enabled security manager: java.lang.ClassCastException: java.lang.IllegalAccessException cannot be cast to java.lang.reflect.InvocationTargetException at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:278) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:178) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:326) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1191) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1162) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:584) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.stop(Bootstrap.java:300) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.commons.daemon.support.DaemonLoader.stop(DaemonLoader.java:200)
resolved fixed
a1e4c86
["java/org/apache/catalina/security/SecurityUtil.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-19T14:28:06Z"
"2008-12-16T20:40:00Z"
46,247
Bug 46247 SVN property patches
null
resolved fixed
408175f
["modules/bayeux/java/org/apache/cometd/bayeux/Bayeux.java", "modules/bayeux/java/org/apache/cometd/bayeux/Channel.java", "modules/bayeux/java/org/apache/cometd/bayeux/Client.java", "modules/bayeux/java/org/apache/cometd/bayeux/DataFilter.java", "modules/bayeux/java/org/apache/cometd/bayeux/Listener.java", "modules/bayeux/java/org/apache/cometd/bayeux/Message.java", "modules/bayeux/java/org/apache/cometd/bayeux/SecurityPolicy.java", "modules/bayeux/java/org/apache/tomcat/bayeux/BayeuxException.java", "modules/bayeux/java/org/apache/tomcat/bayeux/BayeuxRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/BayeuxServlet.java", "modules/bayeux/java/org/apache/tomcat/bayeux/ChannelImpl.java", "modules/bayeux/java/org/apache/tomcat/bayeux/ClientImpl.java", "modules/bayeux/java/org/apache/tomcat/bayeux/HttpError.java", "modules/bayeux/java/org/apache/tomcat/bayeux/MessageImpl.java", "modules/bayeux/java/org/apache/tomcat/bayeux/RequestBase.java", "modules/bayeux/java/org/apache/tomcat/bayeux/RequestFactory.java", "modules/bayeux/java/org/apache/tomcat/bayeux/TomcatBayeux.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/MetaConnectRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/MetaDisconnectRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/MetaHandshakeRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/MetaSubscribeRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/MetaUnsubscribeRequest.java", "modules/bayeux/java/org/apache/tomcat/bayeux/request/PublishRequest.java", "modules/bayeux/test/org/apache/cometd/bayeux/samples/BayeuxStockTicker.java", "modules/bayeux/test/org/apache/cometd/bayeux/samples/EchoChatClient.java", "modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java", "modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-12-05T15:57:43Z"
"2008-11-20T00:13:20Z"
42,077
Bug 42077 the iterator from javax.el.CompositeELResolver#getFeatureDescriptor() must not return null values
null
resolved fixed
8d5db6f
["java/javax/el/CompositeELResolver.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-23T23:35:05Z"
"2007-04-10T07:26:40Z"
42,693
Bug 42693 JSP-Generation error with recursive tagfile structure
addendum: it's Version 6.13 (not available in combobox above) scenario: ========= a menu is decribed by a tree structure; rendering the menu is done by a tagfile 'render_menuitem', which renders the current item either as a leaf item (clicking on it causes an action) or as a node item (clicking on it opens another next-level submenu); rendering the submenu is done by calling the tagfile again from within its body; this worked fine with tomcat 5.0.x and 5.5.x to make it clear see the following pseudo code (the original code is to voluminous): tagfile 'render_menuitem.tagx': <jsp:root ...> <jsp:directive.attribute name="menu_item"/> <c:choose> <c:when test="${menu_item.isNode} <div>node: ${menu_item.label}</div> <c:forEach var="sub_item" items="menu_item.children"> <!-- THIS IS GOING TO CAUSE THE PROBLEM WITH TOMCAT6: --> <tags:render_menuitem menu_item="${sub_item}"/> </c:forEach> <c:when> <c:otherwise> <div>leaf: ${menu_item.label}</div> </c:otherwise> </c:choose> </jsp:root> faulty behaviour: ================ with tomcat 6.0.13, the generated Java-Source for the tagfile reveals, that the body of the doTag() method is empty and therefore emits no html; the compilation itself was silently done, no error or warning was shown in the logfiles.
resolved fixed
b5a5094
["java/org/apache/jasper/compiler/Compiler.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-23T21:25:22Z"
"2007-06-18T15:20:00Z"
42,707
Bug 42707 add host alias using jmx doesn't take affect until restart
null
resolved fixed
23a8ba0
["java/org/apache/catalina/connector/MapperListener.java", "java/org/apache/tomcat/util/http/mapper/Mapper.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-09T01:57:34Z"
"2007-06-20T20:06:40Z"
42,673
Bug 42673 SSI virtual include broken for context path with slashes
If the context path of an application contains slashes (e.g. "a/b") the method getPathWithoutContext of class org.apache.catalina.ssi.SSIServletExternalResolver simply cuts from the second slash, so for url "/a/b/do?.." it tries to include "b/do?.." instead of "do?..". The patch is to include the context path and strip the path off: Line 419 String noContext = getPathWithoutContext(normContext.getContextPath(), normalized); Line 356ff protected String getPathWithoutContext(final String contextPath, final String servletPath) { if (servletPath.startsWith(contextPath)) { return servletPath.substring(contextPath.length()); } return servletPath; }
resolved fixed
4d5cca1
["java/org/apache/catalina/ssi/SSIServletExternalResolver.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-09T01:35:58Z"
"2007-06-15T09:33:20Z"
46,011
Bug 46011 Cannot access to Principal via Subject.getSubject(AccessController.getContext())
Cannot access to Principal via Subject.getSubject(AccessController.getContext()). Problem is that in method internalDoFilter of ApplicationFilterChain in call of filter chain the code determinate the Principal but don't use it: if( Globals.IS_SECURITY_ENABLED ) { final ServletRequest req = request; final ServletResponse res = response; Principal principal = ((HttpServletRequest) req).getUserPrincipal(); Object[] args = new Object[]{req, res, this}; SecurityUtil.doAsPrivilege ("doFilter", filter, classType, args); args = null; } else { In this manner a SecurityUtil.doAsPrivilege will be called with Principal == null and method execute create a Subject with no Principals. Then call a Subject.doAsPrivileged(subject, pea, null); and this do not propagate Principals. I obtain a Subject without Principals calling Subject.getSubject(AccessController.getContext()). In attachment we send our solution
resolved fixed
e148369
["java/org/apache/catalina/core/ApplicationFilterChain.java", "java/org/apache/catalina/security/SecurityUtil.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-05T16:17:16Z"
"2008-10-15T05:53:20Z"
46,047
Bug 46047 Issue when using include directive inside tag files that are inside jar files
null
resolved fixed
38ef38d
["java/org/apache/jasper/compiler/ParserController.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-03T22:47:26Z"
"2008-10-21T06:20:00Z"
42,409
Bug 42409 Extra response headers not sent when using custom error page
If I create a servlet that does the following: response.setHeader("X-BUG", "Value"); response.sendError(HttpServletResponse.SC_BAD_REQUEST); If I use the tomcat default error page for 400 responses, the response will contain the header "X-BUG" with value "Value". However, if I create a custom error page, the response headers do NOT contain the "X-BUG" header in the response. Here is my web.xml, for example: <error-page> <error-code>400</error-code> <location>/400.jsp</location> </error-page> 400.jsp contains plain html: <html> <body> <h3>Custom 400 error page</h3> </body> </html>
resolved fixed
e0489c8
["java/org/apache/catalina/core/StandardHostValve.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-03T14:28:17Z"
"2007-05-14T13:40:00Z"
46,051
Bug 46051 Servlet response writer does not respect line.separator system property
null
resolved fixed
f4bef20
["java/org/apache/catalina/connector/CoyoteWriter.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-11-02T00:48:28Z"
"2008-10-21T14:40:00Z"
46,105
Bug 46105 URIEncoding doesn't affect after form-authentication redirect
How to reproduce bug. Configure tomcat connector with URIEncoding=UTF-8 attribute. Make a simple page that write out any request parameter. Configure this page as protected with form-based authentication. Try to access page, e.g. /site/page.jsp?q=%xx%yy%zz%tt where q=%xx%yy%zz is value in UTF-8 charset. When page is being accessed for the first time, then after authentication, parameter "q" is incorrectly interpreted (it seems as it was in ISO8859-1 or anything else, but not UTF-8). But subsequent access to the _same_ URI, i.e. /site/page.jsp?q=%xx%yy%zz%tt gives perfect result. I also tried useBobyEncodingForURI=true and request.setCharacterEncoding("UTF-8") - nothing is changed.
resolved fixed
d9def07
["java/org/apache/catalina/authenticator/FormAuthenticator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-30T23:46:41Z"
"2008-10-28T05:00:00Z"
46,075
Bug 46075 FileUpload memory usage
The DefaultFileItem class in pacakge org.apache.tomcat.util.http.fileupload creates a ByteArrayOutputStream of the full threshold size for every control on the submitted form. I have a form with 63 controls (checkboxes, text boxes and one File input), and I set the threshold to 20 Meg to allow upload of large image files into memory. I get an OutOfMemory exception since it tries to allocate 63 lots of 20M, although only 1 control requires the requested size. I think it would be much more sensible to create the ByteArrayOutputStream with an initial size of only a few kilobytes size it automatically increases its size as data is written to it.
resolved fixed
85e71cf
["java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-27T22:40:48Z"
"2008-10-23T08:20:00Z"
46,085
Bug 46085 Session are incorrectly expired due to thread unsafe code
null
resolved fixed
6344b96
["java/org/apache/catalina/session/StandardSession.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-27T18:31:50Z"
"2008-10-24T17:40:00Z"
46,096
Bug 46096 DefaultAnnotationProcessor.processAnnotations should use doPrivileged to call getDeclaredFields
If tomcat is running with a SecurityManager, and a JSP uses PageContext.forward, DefaultAnnotationProcessor code can be called with untristed code on the call stack. The processAnnotations method contains the line: Field[] fields = instance.getClass().getDeclaredFields(); getDeclaredFields() is subject to security checks so this throws a java.security.AccessControlException. DefaultAnnotationProcessor is part of the code in the catlina lib directory, which is granted AllPermissions in the standard policy file. However, because there is untrusted JSP code on the stack, these permissions are not used. The call to getDeclaredFields() should be wrapped in an AccessController.doPrivileged call to avoid the exception.
resolved fixed
428c03b
["java/org/apache/catalina/core/DefaultInstanceManager.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-27T17:28:16Z"
"2008-10-27T09:33:20Z"
45,735
Bug 45735 Updated ResourceAttributes.getETag
After looking at a user's list post, I noticed the implementation was not consistent with the other getters (like getName). I propose changing it to: public String getETag(boolean strong) { if (strong) { // The strong ETag must always be calculated by the resources if (strongETag != null) return strongETag; if (attributes != null) { Attribute attribute = attributes.get(ETAG); if (attribute != null) { try { strongETag = attribute.get().toString(); } catch (NamingException e) { ; // No value for the attribute } } } return strongETag; } else { // The weakETag is contentLenght + lastModified if (weakETag == null) { weakETag = "W/\"" + getContentLength() + "-" + getLastModified() + "\""; } return weakETag; } }
resolved fixed
e40c910
["java/org/apache/naming/resources/ResourceAttributes.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-24T21:23:08Z"
"2008-09-03T13:53:20Z"
45,977
Bug 45977 Duplicate comment in code - CoyoteAdapter.java
The XXX comments below seem to say the same thing. Not sure what the XXX represents. /** * Parse additional request parameters. */ protected boolean postParseRequest(org.apache.coyote.Request req, Request request, org.apache.coyote.Response res, Response response) throws Exception { // XXX the processor needs to set a correct scheme and port prior to this point, // in ajp13 protocols dont make sense to get the port from the connector.. // XXX the processor may have set a correct scheme and port prior to this point, // in ajp13 protocols dont make sense to get the port from the connector... // otherwise, use connector configuration if (! req.scheme().isNull()) { // use processor specified scheme to determine secure state request.setSecure(req.scheme().equals("https"));
resolved fixed
e277f6c
["java/org/apache/catalina/connector/CoyoteAdapter.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-09T22:58:03Z"
"2008-10-09T13:46:40Z"
45,951
Bug 45951 Provide support for renaming JSESSIONID
null
resolved fixed
e85ed8c
["java/org/apache/catalina/Globals.java", "java/org/apache/catalina/authenticator/Constants.java", "java/org/apache/jasper/Constants.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-06T18:25:55Z"
"2008-10-05T18:06:40Z"
45,933
Bug 45933 Error processing TLD file in webapp with XML parser
null
resolved fixed
f69637f
["java/org/apache/catalina/core/StandardContext.java", "java/org/apache/catalina/startup/TldConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-10-03T11:53:28Z"
"2008-10-02T04:00:00Z"
45,851
Bug 45851 FarmWarDeployer fails to properly unpack copied war on target node
null
resolved fixed
c340c69
["java/org/apache/catalina/ha/deploy/FarmWarDeployer.java", "java/org/apache/catalina/ha/deploy/FileMessageFactory.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-26T17:37:34Z"
"2008-09-20T03:06:40Z"
45,026
Bug 45026 Custom HTTP-Error codes get remapped to 500er codes
We use Apache 2.2.8 with mod_JK 1.2.26 as a load-balancer for a Tomcat 5.5 cluster. We use Custom HTTP-Error codes like 450 for authentication-purposes. Those codes get remapped to 500. The Error-Code 450 is in the RFC2616 described as valid return code so this is a bug. The custom error-codes worked fine in Apache 1.3.41 with MOD_JK/1.2.25. You can easily reproduce this bug by writing a simple jsp-page with the following line: <%response.setStatus(450);%>
resolved fixed
03097fa
["java/org/apache/jk/common/JkInputStream.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-19T18:51:14Z"
"2008-05-18T08:40:00Z"
45,419
Bug 45419 Return Accept-Ranges from DefaultServlet
Currently the DefaultServlet accepts the "Ranges" request header, but doesn't indicate this in its response by returning "Accept-Ranges: bytes". Although this is not required in HTTP/1.1, setting the header is required in order for the Adobe Acrobat plugin to correctly handle Linearized PDF's (which can speed download by allowing random access to a PDF file). Although it's not strictly necessary according to the specification I can't think of any reason why this header is not safe to set in a response from DefaultServlet, which is always dealing with static files, and not doing so has a negative impact on serving large PDF files - so I'm filing it as a bug rather than an RFE.
resolved fixed
633545f
["java/org/apache/catalina/servlets/DefaultServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-17T19:26:22Z"
"2008-07-17T10:20:00Z"
45,441
Bug 45441 Matching of relevant servlet filters fails when request is forwarded...
I ran into a situation where Tomcat will not execute appropriate filters on a request that has been forwarded. I'm using the handy URLRewriteFilter implementation (from tuckey.org). When I forwarded a request internally, filters that had a matching url-pattern (in the web.xml file) and with a dispatcher setting of both REQUEST and FORWARD were not invoked. On tracing the code (hours later), I found that the problem lies inside the ApplicationDispatcher code. It set the DISPATCHER_REQUEST_PATH_ATTR state attribue to be the servletPath. That meant that only matches using the servlet path would match, but longer (more exact) urls would fail to match. For example, using the following filter mapping: <filter-mapping> <filter-name>my-filter</filter-name> <url-pattern>/app/level/mycode.do</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> would not match a request that was forwarded to /app/level/mycode.do, which it should! Changing the url pattern to be "/app/*" would match, but "/app/level/*" would not, since the servletPath was /app in this example. The fix for this is quite simple. In the ApplicationDispatcher.java code, in the method processRequest() (which is only called for forwards), change the following statement: state.outerRequest.setAttribute (ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, servletPath); to use requestURI instead as follows: state.outerRequest.setAttribute (ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, requestURI ); This resolves the problem and let all the examples above correctly match and run the filter on a forward. I believe includes will also be broken in the same manner. Similar changes to the doInclude() method in ApplicationDispatcher.java will likely resolve that issue as well, though I have not tested this personally. Be nice to see this resolved in 6.0.17+. Thanks! ....Andrzej
resolved fixed
2c0fffe
["java/org/apache/catalina/core/ApplicationDispatcher.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-17T11:11:42Z"
"2008-07-20T16:06:40Z"
45,823
Bug 45823 AccessLogValve doesn't correctly handles combined log format (with patch)
null
resolved fixed
678b516
["java/org/apache/catalina/valves/AccessLogValve.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-17T10:56:37Z"
"2008-09-17T05:40:00Z"
45,618
Bug 45618 Selector is not closed.
null
resolved fixed
d69b378
["java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-02T21:44:37Z"
"2008-08-12T03:00:00Z"
45,413
Bug 45413 Contribution of Bayeux implementation for Tomcat
null
resolved fixed
83fe69a
["java/org/apache/cometd/bayeux/Bayeux.java", "java/org/apache/cometd/bayeux/Channel.java", "java/org/apache/cometd/bayeux/Client.java", "java/org/apache/cometd/bayeux/DataFilter.java", "java/org/apache/cometd/bayeux/Listener.java", "java/org/apache/cometd/bayeux/Message.java", "java/org/apache/cometd/bayeux/SecurityPolicy.java", "java/org/apache/tomcat/bayeux/BayeuxException.java", "java/org/apache/tomcat/bayeux/BayeuxRequest.java", "java/org/apache/tomcat/bayeux/BayeuxServlet.java", "java/org/apache/tomcat/bayeux/ChannelImpl.java", "java/org/apache/tomcat/bayeux/ClientImpl.java", "java/org/apache/tomcat/bayeux/HttpError.java", "java/org/apache/tomcat/bayeux/MessageImpl.java", "java/org/apache/tomcat/bayeux/RequestBase.java", "java/org/apache/tomcat/bayeux/RequestFactory.java", "java/org/apache/tomcat/bayeux/TomcatBayeux.java", "java/org/apache/tomcat/bayeux/request/MetaConnectRequest.java", "java/org/apache/tomcat/bayeux/request/MetaDisconnectRequest.java", "java/org/apache/tomcat/bayeux/request/MetaHandshakeRequest.java", "java/org/apache/tomcat/bayeux/request/MetaSubscribeRequest.java", "java/org/apache/tomcat/bayeux/request/MetaUnsubscribeRequest.java", "java/org/apache/tomcat/bayeux/request/PublishRequest.java", "test/org/apache/cometd/bayeux/samples/EchoChatClient.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-02T20:00:36Z"
"2008-07-16T20:26:40Z"
45,628
Bug 45628 ExtensionValidator doesn't handle wrapped lines in MANIFEST.MF
null
resolved fixed
3773ec4
["java/org/apache/catalina/util/ManifestResource.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-09-02T15:46:00Z"
"2008-08-13T17:53:20Z"
45,666
Bug 45666 JspContextWrapper contains infinite loop in include(String relativeUrlPath, boolean flush)
public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException { include(relativeUrlPath, false); // XXX } just calls itself it seems. Perhaps this should be (just a guess): public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException { invokingJspCtxt.include(relativeUrlPath, false); // XXX } This came up for me when I had a .tag file that had an include in it. I was using Tomcat 5.5 but looking at the source of JspContextWrapper.java it looks like this issue is in 5.5 as well as 6 (and the svn trunk).
resolved fixed
ccc1014
["java/org/apache/jasper/runtime/JspContextWrapper.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-31T21:06:01Z"
"2008-08-21T12:00:00Z"
45,648
Bug 45648 Function 'f:length' not found
null
resolved fixed
6d40691
["java/org/apache/el/parser/ELParser.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-31T19:35:05Z"
"2008-08-18T22:53:20Z"
45,691
Bug 45691 Jasper creates duplicate variable names
Sometimes a JSP's Java code, which have been generated by Jasper, has duplicate variable names. Therefore the JSP cannot be compiled and tomcat delivers an HTTP status code 500. You get an error message like this org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 10 in the jsp file: /test1.jsp Duplicate local variable _jspx_temp0 7: <c:set var="a"> 8: <jsp:attribute name="value"><%= new java.util.Date().toString() %></jsp:attribute> 9: </c:set> 10: <c:set var="b"> 11: <jsp:attribute name="value"><%= new java.util.Date().toString() %></jsp:attribute> 12: </c:set> 13: <h1>Test 1</h1> The reason of this error is the generation of variable names like _jspx_temp0, which are created for <jsp:attribute> tags. At the beginning of parsing a JSP file a counter is reset to 0. Every time an <jsp:attribute> tag occurs, the counter is used to build a variable name _jspx_temp<counter>. Thereafter the counter will be incremented. Unfortunately the counter is a static member of the JspUtil class. Suppose there's a thread 1, which created _jspx_temp4. The counter is 5. Now a second thread (thread 2) starts and resets the counter. Afterwards thread 2 creates _jspx_temp0 to _jspx_temp3. The counter is 4 by now. Then thread 2 stops and thread 1 continues. The next variable's name in thread 1 will be _jspx_temp4, which already exists. Therefore the generated java class cannot be compiled.
resolved fixed
337d6a6
["java/org/apache/jasper/compiler/Compiler.java", "java/org/apache/jasper/compiler/JspUtil.java", "java/org/apache/jasper/compiler/Node.java", "java/org/apache/jasper/compiler/TagPluginManager.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-31T13:47:57Z"
"2008-08-26T11:26:40Z"
45,074
Bug 45074 Add configuration parameters for finer tuning of Http11AprProtocol thread usage
null
resolved fixed
6a1f316
["java/org/apache/coyote/http11/Http11AprProtocol.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-27T07:42:58Z"
"2008-05-23T19:13:20Z"
44,809
Bug 44809 Improve AprLifecycleListener Error Messages
null
resolved fixed
46055c5
["java/org/apache/catalina/core/AprLifecycleListener.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-27T07:23:40Z"
"2008-04-11T13:20:00Z"
43,327
Bug 43327 Socket bind fails on tomcat startup when using apr
I'm running debian sid, kernel 2.6.22 and use tomcat 6.0.14 together with apr 1.2.11. no special tomcat configuration (out of the box). On start up of tomcat I get the following error log: Debugging apr revealed a problem with IPV6: apr_socket_create() assigns a AF_INET6 socket, apr_socket_bind tries to bind a AF_INET address which fails. INFO: Loaded Apache Tomcat Native library 1.1.10. Sep 7, 2007 6:05:16 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Sep 7, 2007 6:05:16 PM org.apache.coyote.http11.Http11AprProtocol init SEVERE: Error initializing endpoint java.lang.Exception: Socket bind failed: [22] Invalid argument at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:121) at org.apache.catalina.connector.Connector.initialize(Connector.java:1059) regards erik
resolved fixed
fea7658
["java/org/apache/tomcat/util/net/AprEndpoint.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-21T13:34:40Z"
"2007-09-07T10:13:20Z"
45,655
Bug 45655 check permisson
null
resolved fixed
b266836
["java/org/apache/juli/ClassLoaderLogManager.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-20T23:36:36Z"
"2008-08-19T18:20:00Z"
45,608
Bug 45608 Race conditions on field countAllocated of class org.apache.catalina.core.StandardWrapper
We found field countAllocated are accessed by allocate() and deallocate() without any protections by locks. Here is a trace log, Thread http-8081-1 id: 23 : READ [org.apache.catalina.core.StandardWrapper : allocate : 820] [org.apache.catalina.core.StandardWrapperValve : invoke : 129] [org.apache.catalina.core.StandardContextValve : invoke : 175] [org.apache.catalina.core.StandardHostValve : invoke : 128] [org.apache.catalina.valves.ErrorReportValve : invoke : 104] [org.apache.catalina.core.StandardEngineValve : invoke : 109] [org.apache.catalina.connector.CoyoteAdapter : service : 261] [org.apache.coyote.http11.Http11Processor : process : 844] [org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler : process : 581] [org.apache.tomcat.util.net.JIoEndpoint$Worker : run : 447] [java.lang.Thread : run : 735] Thread http-8081-4 id: 26 : WRITE [org.apache.catalina.core.StandardWrapper : deallocate : 871] [org.apache.catalina.core.StandardWrapperValve : invoke : 298] [org.apache.catalina.core.StandardContextValve : invoke : 175] [org.apache.catalina.core.StandardHostValve : invoke : 128] [org.apache.catalina.valves.ErrorReportValve : invoke : 104] [org.apache.catalina.core.StandardEngineValve : invoke : 109] [org.apache.catalina.connector.CoyoteAdapter : service : 261] [org.apache.coyote.http11.Http11Processor : process : 844] [org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler : process : 581] [org.apache.tomcat.util.net.JIoEndpoint$Worker : run : 447] [java.lang.Thread : run : 735] Thread http-8081-4 and http-8081-1 will access countAllocated in parallel. Since increment and decrement is *NOT* atomic, we think it is a potential race condition.
resolved fixed
816ecb8
["java/org/apache/catalina/core/StandardWrapper.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-12T15:10:23Z"
"2008-08-11T02:00:00Z"
41,407
Bug 41407 CLIENT-CERT Authentication with JAASRealm not working
I tried to config my webapp to authenticate user by CLIENT-CERT auth method. I verified my JAAS LoginModule by using "BASIC" to auth method and successfully authenticated user login. After studying Tomcat 5.5.20 source, I found that the problem is caused by the RealmBase.java and JAASRealm.java. if CLIENT-CERT auth method is used, SSLAuthenticator will call the : JAASRealm.authenticate(X509Certificate certs[]) As JAASRealm didn't override authenticate(X509Certificate certs[]), RealmBase's authenticate will be used and it will only validate the certs and then call getPrincipal(X509Certificate) and then getPrincipal(String) is being called to get the Principal. However, in JAASRealm, this function always return null. That means Tomcat can't use JAASRealm with CLIENT-CERT auth method. Thanks Butler
resolved fixed
6d78232
["java/org/apache/catalina/realm/JAASCallbackHandler.java", "java/org/apache/catalina/realm/JAASMemoryLoginModule.java", "java/org/apache/catalina/realm/JAASRealm.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-09T14:32:47Z"
"2007-01-18T22:40:00Z"
45,576
Bug 45576 JAASRealm not working with DigestAuthenticator
null
resolved fixed
c984c6a
["java/org/apache/catalina/realm/JAASCallbackHandler.java", "java/org/apache/catalina/realm/JAASMemoryLoginModule.java", "java/org/apache/catalina/realm/JAASRealm.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-09T12:10:34Z"
"2008-08-06T05:20:00Z"
45,591
Bug 45591 NullPointerException during shutdown in JKMain.pause()
On startup, if Tomcat discovers that the main port is already bound to another process, it fails and tries to execute the shutdown code. In some situations (I'm not sure which), the org.apache.jk.server.JKMain instance variable wEnv is null at this point, which causes a NullPointerException when JKMain.pause() is called (see stacktrace below). Since this is occurring within a shutdown hook thread, it can result in a dirty shutdown of the JVM. I've observed this with Tomcat 5.5.20, but I looked over the code in 5.5.26 and it looks like the same problem is still present. Fortunately, the solution is very simple. Just add the following if test at the beginning of JKMain.pause(): if (wEnv == null) { return; } Stacktrace: SEVERE: StandardServer.await: create[8006]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at org.apache.catalina.core.StandardServer.await(StandardServer.java:372) at org.apache.catalina.startup.Catalina.await(Catalina.java:615) at org.apache.catalina.startup.Catalina.start(Catalina.java:575) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Aug 7, 2008 3:25:34 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8000 Aug 7, 2008 3:25:34 PM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.lang.NullPointerException at org.apache.jk.server.JkMain.pause(JkMain.java:678) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:162) at org.apache.catalina.connector.Connector.pause(Connector.java:1031) at org.apache.catalina.core.StandardService.stop(StandardService.java:491) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:644)
resolved fixed
38a62a6
["java/org/apache/jk/server/JkMain.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-08-08T14:31:20Z"
"2008-08-07T17:26:40Z"
45,453
Bug 45453 JDBCRealm.getRoles bad synchronization causes hangs w/ DIGEST authentication
JDBCRealm.getRoles bad synchronization causes hangs w/ DIGEST authentication JDBCRealm caches PreparedStatement preparedRoles. That, and missing synchronization in JDBCRealm and/or DigestAuthenticator allow two threads to call getRoles simultaneously so that T1 will do stmt.executeQuery() while T2 does stmt.setString(1, userName) plus another .executeQuery() on the same PreparedStatement object. In the worst case, the JDBC driver gets confused by this, and blocks forever waiting for server response, causing all other threads that try to access DB hang. (This was observed with PostgreSQL 8.3-603-jdbc4 JDBC driver) org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350) org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254) org.apache.catalina.realm.JDBCRealm.getRoles(JDBCRealm.java:631) org.apache.catalina.realm.JDBCRealm.getPrincipal(JDBCRealm.java:596) org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:399) org.apache.catalina.authenticator.DigestAuthenticator.findPrincipal(DigestAuthenticator.java:283) org.apache.catalina.authenticator.DigestAuthenticator.authenticate(DigestAuthenticator.java:176)
resolved fixed
9d3cad7
["java/org/apache/catalina/realm/JDBCRealm.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-29T14:58:05Z"
"2008-07-22T07:00:00Z"
45,459
Bug 45459 Startup Listener error message unhelpful
null
resolved wontfix
4cab5f3
["java/org/apache/catalina/core/StandardContext.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-29T14:29:27Z"
"2008-07-22T12:33:20Z"
42,727
Bug 42727 CoyoteReader readLine returns null for some post request bodies that are a multiple of MAX_LINE_LENGTH in size
null
resolved fixed
92f847d
["java/org/apache/catalina/connector/CoyoteReader.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-17T22:09:18Z"
"2007-06-23T09:13:20Z"
42,722
Bug 42722 Potential NullPointerException in org.apache.catalina.servlets.CGIServlet
null
resolved fixed
d41f610
["java/org/apache/catalina/servlets/CGIServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-10T21:11:16Z"
"2007-06-22T08:13:20Z"
42,678
Bug 42678 docBase ignored even if its not a subdir of appBase
I use latest 6.0 SVN snapshot. I store deployable WARs in "webapps-dist" (aside "webapps"). This is my setup: bash-3.2$ ls $CATALINA_BASE conf logs temp tomcat-dist webapps webapps-dist work bash-3.2$ ls webapps-dist sample.war bash-3.2$ cat conf/Catalina/localhost/sample.xml <Context docBase="${catalina.base}/webapps-dist/sample.war"/> this ends up in: WARNUNG: A docBase /home/juergen/java/tomcat/webapps-dist/sample.war inside the host appBase has been specified, and will be ignored
resolved fixed
252fca1
["java/org/apache/catalina/startup/HostConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-10T17:01:23Z"
"2007-06-15T17:53:20Z"
45,317
Bug 45317 DeltaManager always reports default timeout value for receiving session state on startup
Hi there, If I override the state transfer timeout: <Manager className="org.apache.catalina.ha.session.DeltaManager" stateTransferTimeout="10" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/> DeltaManager continues to log the default timeout value (ie: "This operation will timeout if no session state has been received within 60 seconds."): 2008-07-01 14:31:30,419 WARN [org.apache.catalina.ha.session.DeltaManager] - Manager [localhost#/manager], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -64, 104, -55}:15000,{10, -64, 104, -55},15000, alive=18586,id={-62 91 -70 -63 -111 50 70 -33 -104 41 -48 -32 91 34 -83 -55 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds. 2008-07-01 14:31:35,310 WARN [org.apache.catalina.ha.ClusterListener] - Context manager doesn't exist:localhost#/host-manager But it actually uses the correct timeout value (ie: "timing out after 10,100 ms"): 2008-07-01 14:31:40,518 ERROR [org.apache.catalina.ha.session.DeltaManager] - Manager [localhost#/manager]: No session state send at 01/07/08 14:31 received, timing out after 10,100 ms. This is only an incorrect message, but it is quite annoying especially coupled with the fact that the above configuration is only documented for tomcat 5 (where syntax is subtly different).
resolved fixed
36bb5d9
["java/org/apache/catalina/ha/session/DeltaManager.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-07-02T20:41:10Z"
"2008-07-01T11:00:00Z"
36,155
Bug 36155 tomcat chooses wrong host if using mod_jk
null
resolved fixed
f23907d
["java/org/apache/coyote/ajp/AjpMessage.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-06-28T02:11:48Z"
"2005-08-12T09:46:40Z"
45,279
Bug 45279 McastServiceImpl leaks sockets.
McastServiceImpl does not close its socket in stop() as it claims. It merely calls leaveGroup(), which is sufficient to stop receiving messages, but does not close the socket. This causes a file descriptor leak each time the service is stopped. add; socket.close(); after leaveGroup();
resolved fixed
a2a7714
["java/org/apache/catalina/tribes/membership/McastServiceImpl.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-06-25T20:44:48Z"
"2008-06-25T16:06:40Z"
45,101
Bug 45101 DirContextURLConnection - Format Date Header Values per HTTP spec
null
resolved fixed
e0200b0
["java/org/apache/naming/resources/DirContextURLConnection.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-29T21:32:02Z"
"2008-05-29T16:53:20Z"
42,750
Bug 42750 Http Post requests not handled correctly if there is more than one space between the "POST" and the URL
null
resolved fixed
f93376d
["java/org/apache/coyote/http11/InternalAprInputBuffer.java", "java/org/apache/coyote/http11/InternalInputBuffer.java", "java/org/apache/coyote/http11/InternalNioInputBuffer.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-19T20:07:20Z"
"2007-06-26T20:33:20Z"
44,986
Bug 44986 JSP compilation exception with pageEncoding="utf-8" and file with byte order marks
JSP-File has byte order marks. If the attribute is set to "UTF-8" (upper case) or the file has no byte order marks, the compilation workes fine. {code} 12:32:16,946 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /dialog.jsp(2,0) Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8) at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236) at org.apache.jasper.compiler.Validator$DirectiveVisitor.comparePageEncodings(Validator.java:362) at org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:197) at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394) at org.apache.jasper.compiler.Node$Root.accept(Node.java:489) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338) at org.apache.jasper.compiler.Validator.validate(Validator.java:1700) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292) at de.cit.jsp.control.DispatchServlet.forward(DispatchServlet.java:286) at de.cit.jsp.control.DispatchServlet.doGet(DispatchServlet.java:272) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.cit.util.javax.servlet.ValidationFilter.doFilter(ValidationFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at de.cit.util.javax.servlet.jsp.XHtmlContentTypeFilter.doFilter(XHtmlContentTypeFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619) {code} Case insensitive camparison in org.apache.jasper.compiler.Validator.comparePageEncodings(...) seems to fix the problem: {code} /* * Compares page encodings specified in various places, and throws * exception in case of page encoding mismatch. * * @param pageDirEnc The value of the pageEncoding attribute of the page * directive @param pageDir The page directive node * * @throws JasperException in case of page encoding mismatch */ private String comparePageEncodings(String pageDirEnc, Node.PageDirective pageDir) throws JasperException { Node.Root root = pageDir.getRoot(); String configEnc = root.getJspConfigPageEncoding(); /* * Compare the 'pageEncoding' attribute of the page directive with * the encoding specified in the JSP config element whose URL * pattern matches this page. Treat "UTF-16", "UTF-16BE", and * "UTF-16LE" as identical. */ if (configEnc != null) { if (!pageDirEnc.equalsIgnoreCase(configEnc) && (!pageDirEnc.toUpperCase().startsWith("UTF-16") || !configEnc .toUpperCase().startsWith("UTF-16"))) { err.jspError(pageDir, "jsp.error.config_pagedir_encoding_mismatch", configEnc, pageDirEnc); } else { return configEnc; } } /* * Compare the 'pageEncoding' attribute of the page directive with * the encoding specified in the XML prolog (only for XML syntax, * and only if JSP document contains XML prolog with encoding * declaration). Treat "UTF-16", "UTF-16BE", and "UTF-16LE" as * identical. */ if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || root.isBomPresent()) { String pageEnc = root.getPageEncoding(); if (!pageDirEnc.equalsIgnoreCase(pageEnc) && (!pageDirEnc.toUpperCase().startsWith("UTF-16") || !pageEnc .toUpperCase().startsWith("UTF-16"))) { err.jspError(pageDir, "jsp.error.prolog_pagedir_encoding_mismatch", pageEnc, pageDirEnc); } else { return pageEnc; } } return pageDirEnc; } {code}
resolved fixed
3c84dcf
["java/org/apache/jasper/compiler/Validator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-13T21:40:59Z"
"2008-05-13T09:13:20Z"
42,934
Bug 42934 sessionDidActivate() called before contextInitialized()
I'm using Seam and a Seam app depends upon the Seam application being initialized before you can do much of anything in Seam. That said Seam puts some hooks into the sessionDidActivate() and sessionDidPassivate() events. Because of that when I start up my app I'm getting a Seam IllegalStateException because the contextInitialized() event is fired after sessionDidActivate() so Seam is not yet initialized it's Session hooks are being fired. What makes me think this is a bug is that sessionWillPassivate() is being correctly called before contextDestroyed() so it would seem that sessionDidActivate() being called before contextInitialized() would be inconsistent behavior. So to sum up I think tomcat should fire context and session events in the following order: contextInitialized sessionDidActivate sessionWillPassivate contextDestroyed As a side note Tomcat 5 follows what I think is the completely wrong but consistent order by firing events in this order: sessionDidActivate contextInitialized contextDestroyed sessionWillPassivate
resolved fixed
a9cb6a6
["java/org/apache/catalina/core/StandardContext.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-09T20:21:20Z"
"2007-07-18T17:33:20Z"
42,943
Bug 42943 jsp:text gets confused with other *:text elements in a JSP tag file
null
resolved fixed
17b4436
["java/org/apache/jasper/compiler/JspDocumentParser.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-08T21:53:35Z"
"2007-07-20T08:26:40Z"
43,080
Bug 43080 Suspicious url pattern warning logged to wrong webapp
"Suspicious url pattern" warnings are logged to the wrong webapp, not the one actually using them. These log events are coming from SecurityCollection.java.
resolved fixed
332d0f0
["java/org/apache/catalina/core/StandardContext.java", "java/org/apache/catalina/deploy/SecurityCollection.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-04T10:41:48Z"
"2007-08-09T20:06:40Z"
43,191
Bug 43191 compressableMimeType attribute ignored
I have set compression="on" and compressableMimeType="text/html" in server.xml. It appears that the value of compressableMimeType is being ignored. My XML responses are all coming back gzipped. If I switch to compression="off" the responses are not gzipped, but as soon as I turn it on, regardless of the value of compressableMimeType, the XML responses are coming back gzipped. A full Connector tag follows. Note that this is just an example -- I have tried many values for compressableMimeType (that do NOT include text/xml) and the responses are still compressed. <Connector port="7630" address="${jboss.bind.address}" maxThreads="20" minSpareThreads="4" maxSpareThreads="10" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="7643" acceptCount="16" connectionTimeout="20000" disableUploadTimeout="true" compression="off" compressableMimeType="text/html,text/javascript,application/x-javascript,application/javascript" />
resolved fixed
e2524a8
["java/org/apache/coyote/http11/Http11AprProcessor.java", "java/org/apache/coyote/http11/Http11NioProcessor.java", "java/org/apache/coyote/http11/Http11Processor.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-03T10:14:00Z"
"2007-08-22T19:13:20Z"
43,150
Bug 43150 Tomcat and path with pound sign (#) -> ClassNotFoundException
Tomcat will not start if it's located and launched from a path with a # (pound) character somewhere. You'll find all informations in the given mail-thread on tomcat-user, including some developer specific informations. One part of the problem is the usage of File.toURL in URLClassloader... I'd really appreciate it if this problem could be fixed/worked around (see mail-thread for hints). btw. the same applies to version 5.5 and probably earlier versions too. thanks!
resolved fixed
fa91954
["java/org/apache/catalina/startup/ClassLoaderFactory.java", "java/org/apache/jasper/JspCompilationContext.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-01T21:25:01Z"
"2007-08-16T18:46:40Z"
43,142
Bug 43142 webapp expanded in a FOLDER named webapps/xxx.war is loaded TWICE
reproduce: copy the expanded of file xxx.war file in a FOLDER tomcat/webapps/xxx.war bug: tomcat will load the app TWICE
resolved fixed
6a8b1bb
["java/org/apache/catalina/startup/HostConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-05-01T07:00:14Z"
"2007-08-16T10:26:40Z"
43,366
Bug 43366 Session Statistics command in manager fails with "Unknown command /sessions"
null
resolved fixed
f4a7632
["java/org/apache/catalina/manager/ManagerServlet.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-27T17:59:02Z"
"2007-09-12T12:26:40Z"
44,877
Bug 44877 ClassCastException due to bad TagHandlerPool name generation of two different tags
null
resolved fixed
dfa25f4
["java/org/apache/jasper/compiler/Generator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-27T17:19:48Z"
"2008-04-25T19:00:00Z"
43,425
Bug 43425 Non-compliant annotations
null
resolved fixed
48131cd
["java/javax/annotation/security/DenyAll.java", "java/javax/ejb/EJB.java", "java/javax/persistence/PersistenceContext.java", "java/javax/persistence/PersistenceProperty.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-25T22:55:38Z"
"2007-09-19T02:46:40Z"
31,257
Bug 31257 java.endorsed.dirs is not used when JSP compilation is forked
When the JSP compiler forks a javac process, it should check to see what the currently endorsed directories are (check the system property "java.endorsed.dirs" - otherwise, classes end up missing and JSP pages do not properly compile. We experienced a problem when we explicitly set the java.endorsed.dirs property on the command line, and the JSP compiler did not use it when javac was forked. I have patched org.apache.jasper.compiler.Compiler to support this: *** src.original\jakarta-tomcat-jasper\jasper2 \src\share\org\apache\jasper\compiler\Compiler.java Tue Jun 15 17:30:35 2004 --- src\org\apache\jasper\compiler\Compiler.java Thu Sep 16 00:05:14 2004 *************** *** 349,358 **** --- 349,369 ---- extdirs.setPath(exts); javac.setExtdirs(extdirs); info.append(" extension dir=" + exts + "\n"); } + // Add endorsed directories + String endorsed = System.getProperty("java.endorsed.dirs"); + if(endorsed != null) { + Javac.ImplementationSpecificArgument endorsedArg = javac.createCompilerArg(); + endorsedArg.setLine("-J-Djava.endorsed.dirs="+endorsed); + info.append(" endorsed dir=" + endorsed + "\n"); + } + else { + info.append(" no endorsed dirs specified\n"); + } + // Configure the compiler object javac.setEncoding(javaEncoding); javac.setClasspath(path); javac.setDebug(ctxt.getOptions().getClassDebugInfo()); true, i should probably check ctxt.getOptions().getFork() in the if() as well, but since i always fork it doesn't matter to me.
resolved fixed
0ea3e15
["java/org/apache/jasper/compiler/AntCompiler.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-20T22:39:35Z"
"2004-09-16T10:20:00Z"
29,936
Bug 29936 XML parser loading problems by container
I'm trying to use JSTL 1.1 with this version of tomcat and have both saxon and crimson in my web-app. If we have crimson and saxon in our webapp lib then tomcat tries to use crimson as the xml parser when reading the web.xml and compiling the jsp and we get the prefix error: org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c</h3><p>null: java.lang.IllegalStateException: can't declare any more prefixes in this context</p><h3>Validation error messages from TagLibraryValidator for fmt</h3><p>null: java.lang.IllegalStateException: can't declare any more prefixes in this context</p> If we remove crimson, tomcat uses saxon (aelfred parser) and this fails on reading the web.xml (javax.xml.parsers.ParserConfigurationException: AElfred parser is namespace-aware) If we remove saxon and crimson then we are okay (defaults to xerces in the tomcat endorsed directory?) It seems to me that tomcat is using the parser in my web-app to read the web.xml rather than using xerces from the endorsed directory. The same web-app runs without problems in version 5.0.16. Tomcat seems to be using the service provider mechanism in 5.0.25 as I have property files in C:\Java\jakarta-tomcat-5.0.25 \work\Catalina\localhost\diabetes\loader\META-INF\services (can't find any documents on this). If I'm using more than one parser won't this cause problems as tomcat is setting only one parser and xslt processor here? Any comments are gratefully received. Thanks, Peter Neville
resolved fixed
06c23d8
["java/org/apache/catalina/startup/ContextConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-20T20:47:57Z"
"2004-07-06T18:53:20Z"
44,380
Bug 44380 TldConfig / Scan of URL that are not files
The TldConfig class (org.apache.catalina.startup) is asking ClassLoader and all parent ClassLoader in order to get the URLs and then assume that the URLs are using "file" protocol. But when Tomcat is embedded, sometimes the URL are not always using "file" protocol and then new File() will fail. The given patch is to skip the URLs that are not using file protocol (that avoids ugly NPE in the "new File(urls[i].toURI());" call
resolved fixed
2edf51e
["java/org/apache/catalina/startup/TldConfig.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-11T23:07:10Z"
"2008-02-08T11:26:40Z"
44,389
Bug 44389 Cleanup of org.apache.naming.resources.CacheEntry resources (memory leak)
Hi, I am memory profiling a webapp for my company because we suspect it has memory leaks when redeploying. This webapp has to be redeployed several times a week for security reasons (most of the time it is undeployed) and the memory leaks forced us to shutdown tomcat once a week to avoid OOM exception. I'm using jvm1.5 and tomcat 6.0.13 (also tried with 6.0.14 and today with 6.0.16), and Yourkit as the profiling tool. I have made the test in both linux and windows. I have created a JMeter test to deploy the app using the manager, make some request to the app and then undeploy it using again the manager app in a loop. After some redeployments, I got my OutOfMemoryException. Then I checked with my profiling tool and found that my own classes were correctly destroyed, and the classes retaining more memory were these ones (listed as a heirarchy): org.apache.catalina.core.ApplicationContext$DispatchData org.apache.catalina.core.ApplicationContext mapper of org.apache.catalina.core.StandardContext context of org.apache.tomcat.util.http.mapper.Mapper resources of org.apache.tomcat.util.http.mapper.Mapper$Context cache of org.apache.naming.resources.ProxyDirContext cache of org.apache.naming.resources.ResourceCache org.apache.naming.resources.CacheEntry[] The number of objects of each class were exactly the number of times I had redeployed the webapp. I have checked the contents of CacheEntry inside CacheEntry[] and it has an attribute "name" and the contents are the jsps and tld files of my app. There are as many CacheEntry with the same jsp attribute as times the webapp has been reloaded, so I guess there is no cleaning of CacheEntry resources at context shutdown. To reproduce this, a simple webapp with 2 jsp and a taglibrary can be used. Deploy and undeploy it many times so you can see how the count of these objects grows in memory.
resolved fixed
6723b35
["java/org/apache/catalina/core/ApplicationContext.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-11T22:34:45Z"
"2008-02-11T06:06:40Z"
44,391
Bug 44391 SSI handling of escaped characters broken
In org.apache.catalina.ssi.SSIProcessor the method parseParamNames is broken. If I have a SSI directive like <!--#set var="test" value="blubb\"\"" --> the method detects three parameters instead of two. This is because there are two consecutive escaped characters. Although the first one \" is detected correctly the next one isn't because the flag escaped is still set to true, although this character isn't escaped anymore. You have to replace boolean escaped = false; for (; bIdx < cmd.length() && quotes != 2; bIdx++) { char c = cmd.charAt(bIdx); // Need to skip escaped characters if (c == '\\' && !escaped) { escaped = true; bIdx++; continue; } escaped = false; if (c == '"') quotes++; } by for (; bIdx < cmd.length() && quotes != 2; bIdx++) { char c = cmd.charAt(bIdx); // Need to skip escaped characters if (c == '\\') { bIdx++; continue; } if (c == '"') quotes++; } Just removing the flag escaped is sufficient, because you don't have to remember whether the last character was escaped and that should have no influence to consecutive characters. The bug still exists in the HEAD revision of the repository.
resolved fixed
df75937
["java/org/apache/catalina/ssi/SSIProcessor.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-11T21:25:59Z"
"2008-02-11T08:53:20Z"
44,392
Bug 44392 HTML entities not resolved in SSI filter
HTML entities which are contained in an SSI set directive aren't resolved by the SSI filter (in contrary to what is done by mod_include of Apaches HTTP). mod_include resolves all HTML entities in most of the attribute values of ssi directives. It also resolves \" to " and \$ to $. The ssi filter of tomcat resolves all escaped character which are escaped with a backslash, but no HTML entities at all. Apart from that, giving encoding "entity" should be different from giving encoding="none" to the SSI echo directive. One should replace all invalid HTML characters by valid HTML entities and the other one should do nothing. The encoding is especially important if you wan't to store a HTML-Comment within a SSI variable. If I want to store a variable test with the value "<!-- testvalue "x" -->" <!--#set var="test" value="<!-- testvalue "x" -->"--> for mod_include you must write: <!--#set var="test" value="<!&#45;&#45; testvalue \"x\" &#45;&#45;>" --> for Tomcats SSI you must write: <!--#set var="test" value="<!\-\- testvalue \"x\" \-\->" --> And there should be a difference whether I output this variable with <!--#echo var="test" encoding="none" --> which should lead to <!-- testvalue "x" -->, or <!--#echo var="test" encoding="entity" --> which should lead to &lt;!-- testvalue &quot;x&quot; --&gt;
resolved fixed
75fbd91
["java/org/apache/catalina/ssi/SSIEcho.java", "java/org/apache/catalina/ssi/SSIMediator.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-11T20:07:26Z"
"2008-02-11T11:40:00Z"
44,408
Bug 44408 EL-expression evaluation slow due to synchronization caused by JspFactory.getDefaultFactory
null
resolved fixed
1f41c3d
["java/org/apache/jasper/runtime/PageContextImpl.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-10T17:29:23Z"
"2008-02-13T08:06:40Z"
44,428
Bug 44428 FunctionMapperImpl.Function throws a NPE in certain circumstances
In FunctionMapperImpl.Function it is possible for writeExternal to fail if the class has just been de-serialised and is then serialised again. If you look at writeExternal: public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF((this.prefix != null) ? this.prefix : ""); out.writeUTF(this.localName); out.writeUTF(this.m.getDeclaringClass().getName()); out.writeUTF(this.m.getName()); out.writeObject(ReflectionUtil.toTypeNameArray( this.m.getParameterTypes())); } you can see that it externalises the function to be invoked by using the reference to the Method itself. If you look at readExternal however: public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.prefix = in.readUTF(); if ("".equals(this.prefix)) this.prefix = null; this.localName = in.readUTF(); this.owner = in.readUTF(); this.name = in.readUTF(); this.types = (String[]) in.readObject(); } You can see that it doesn't restore the Method after deserialisation. The method is restored if it is accessed, however if it's not and then serialisation is performed writeExternal will throw a NPE (as m is still null). The fix is to either get the method to be reconstructed as soon as deserialisation completes - or perhaps to be a bit more efficient, in writeExternal change it such that if m is null it externalises using the components of the method: public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF((this.prefix != null) ? this.prefix : ""); out.writeUTF(this.localName); if (m == null) { out.writeUTF(this.owner); out.writeUTF(this.name); out.writeObject(this.types); } else if (this.m != null) { out.writeUTF(this.m.getDeclaringClass().getName()); out.writeUTF(this.m.getName()); out.writeObject(ReflectionUtil.toTypeNameArray( this.m.getParameterTypes())); } }
resolved fixed
0035fd4
["java/org/apache/el/lang/FunctionMapperImpl.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-09T22:33:01Z"
"2008-02-15T07:20:00Z"
44,595
Bug 44595 Add possibility to request the QueueSize of an executor via JMX
null
resolved fixed
c3c525b
["java/org/apache/catalina/core/StandardThreadExecutor.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-04-07T09:29:41Z"
"2008-03-13T06:33:20Z"
44,529
Bug 44529 RealmBase authorization via hasResourcePermission not fully servlet spec compliant
The authorization implementation in RealmBase, in the hasResourcePermission method is not fully servlet specification compliant. The spec (both 2.4 and 2.5) states: "... A security constraint that does not contain an authorization constraint shall combine with authorization constraints that name or imply roles to allow unauthenticated access. The special case of an authorization constraint that names no roles shall combine with any other constraints to override their affects and cause access to be precluded. ..." In Tomcat this works fine as long as there aren't weird (but legal!) combinations or security-constraints on the same URLs. Example: <security-constraint> <web-resource-collection> <url-pattern>/someUrl/*</url-pattern> <http-method>POST</http-method> </web-resource-collection> <!-- no auth-constraint, to allow everyone --> </security-constraint> <security-constraint> <web-resource-collection> <url-pattern>/someUrl/*</url-pattern> <http-method>POST</http-method> </web-resource-collection> <!-- no roles, to allow noone --> <auth-constraint /> </security-constraint> (if we ignore that this kind of configuration is pretty pointless,) the spec dictates that a POST to /someUrl/index.html should be denied access. Tomcat grants it. (both 5.5.23 and 6.0.14 do) Example 2: <security-constraint> <web-resource-collection> <url-pattern>/someUrl/*</url-pattern> <http-method>POST</http-method> </web-resource-collection> <!-- no roles, to allow noone --> <auth-constraint /> </security-constraint> <security-constraint> <web-resource-collection> <url-pattern>/someUrl/*</url-pattern> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> </security-constraint> Now it gets interesting. In "strict" mode, access to /someUrl/index.html is denied (regardless of the web.xml-configured security roles and the roles the user has). In "auth-only" mode, access is always granted, and in "strict auth-only" mode access is granted if there are no web.xml-configured security roles. Now these modes are a Tomcat addition to the spec, but I feel access should have been denied in all modes, both to stay in line with the spec and to keep the behaviour predictable.
resolved fixed
7be2374
["java/org/apache/catalina/realm/RealmBase.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-03-29T14:48:24Z"
"2008-03-04T14:13:20Z"
44,673
Bug 44673 ServletInputStream still readable even when closed
null
resolved fixed
ca41a27
["java/org/apache/catalina/connector/InputBuffer.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-03-25T23:36:56Z"
"2008-03-25T18:33:20Z"
44,646
Bug 44646 IllegalStateException when using CometConnectionManagerValve
We're writing an application that processes requests using both a normal servlet and a CometProcessor. The normal servlet handles user authentication and logout (among other things). Once the user has been authenticated, the client makes a Comet request, which is open until the server has something to push to the client. When the user decides to log out, we need to stop processing Comet events for that client. I enabled the CometConnectionManagerValve in context.xml, hoping I would get an END event when the session goes away. Instead, I get an IllegalStateException: Mar 10, 2008 2:05:41 PM org.apache.catalina.connector.CoyoteAdapter event SEVERE: An exception or error occurred in the container during the request processing java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2301) at org.apache.catalina.connector.Request.getSession(Request.java:2075) at org.apache.catalina.valves.CometConnectionManagerValve.event(CometConnectionManagerValve.java:311) at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:179) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:200) at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:128) at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:198) at org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:749) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:653) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Presumably my servlet handles the "logout" request, and after sending a response to the client, calls invalidate() on the HttpSession. Subsequently, CometConnectionManagerValue.event() calls request.getSession(true), resulting in the IllegalStateException.
resolved fixed
fdac1d6
["java/org/apache/catalina/valves/CometConnectionManagerValve.java"]
Tomcat
https://github.com/apache/tomcat
apache/tomcat
java
null
null
null
"2008-03-23T23:22:07Z"
"2008-03-20T13:33:20Z"