Re: DBCP Deadlock

2009-02-09 Thread James Abley

Hi,

I'm running Tomcat 6.0.18 and still see this issue. Can you provide more
information about how one might disable background validation, or when a
version of Tomcat might be released does not contain this issue [1]? My
resource is currently defined like this:



I think that disabling background validation means I should remove the
testWhileIdle attribute and instead use testOnBorrow [2], but I would like
to confirm.

Cheers,

James

[1]
http://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
[2]
http://dev.mysql.com/doc/refman/5.1/en/connector-j-usagenotes-j2ee.html#connector-j-usagenotes-tomcat


Filip Hanik - Dev Lists wrote:
> 
> Tomcat uses 1.2.2 in that version, so I would suggest not using the 
> background validation at this point
> 
> Filip
> 
> Metta wrote:
>> I'm running TC 6.0.16 on 64Bit RH Linux 5.1
>>
>> We're seeing a deadlock in the tomcat-dbcp - looks like it's to do with
>> the
>> abandoned connection checking. I thought 6.0.16 used the
>> commons-dbcp-1.2.2
>> release which supposedly fixes this issue?
>>
>> =
>> "Timer-3":
>>   waiting to lock monitor 0x53b40548 (object 0x2aaabf3210f0,
>> a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection),
>>   which is held by "TP-Processor27"
>> "TP-Processor27":
>>   waiting to lock monitor 0x53b404d0 (object 0x2aaab9fa8b08,
>> a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool),
>>   which is held by "Timer-3"
>>
>> Java stack information for the threads listed above:
>> ===
>> "Timer-3":
>> at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:175)
>> - waiting to lock <0x2aaabf3210f0> (a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection)
>> at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
>> at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.(AbandonedTrace.java:82)
>> at
>> org.apache.tomcat.dbcp.dbcp.DelegatingStatement.(DelegatingStatement.java:61)
>> at
>> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
>> at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
>> at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
>> at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
>> - locked <0x2aaab9fa8b08> (a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
>> at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
>> at java.util.TimerThread.mainLoop(Timer.java:512)
>> at java.util.TimerThread.run(Timer.java:462)
>> "TP-Processor27":
>> at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1136)
>> - waiting to lock <0x2aaab9fa8b08> (a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
>> at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
>> at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:87)
>> - locked <0x2aaabf3210f0> (a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection)
>> 
>>   
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DBCP-Deadlock-tp17999703p21910567.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 46676] New: Configurable test request for Watchdog thread

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46676

   Summary: Configurable test request for Watchdog thread
   Product: Tomcat Connectors
   Version: 1.2.27
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: mod_jk
AssignedTo: dev@tomcat.apache.org
ReportedBy: gerhardus.geldenh...@gmail.com


It would be really great to have a configurable thread to test for the
availability of a node in a cluster by the watchdog thread. The ping test is
not always enough and in a production environment you don't really want
production threads to be used as a way of testing whether a node is available
or not. 

In our environment we use the web interface of modjk programatically to
stop/start (remove/add to cluster) tomcat nodes in a load balanced cluster
while they are upgraded. If the watchdog thread were extended the following
additions to the web interface would be handy:
A function to test a node using the configured request.
A function to enter a custom url test string to test the node.

Furthermore if the test url could be set dynamically without needing a config
reload it would be very handy to do dynamic differentiated testing during the
course of a day.

As a start a url and search string to match on the page would probably be
enough.
Eg
TestUrl='localhost:/myapp/deployinfo.jsp'
TestString='hello world'


Maybe in the future one could extend this even more to submit xml(soap,
something else) to a server and have a seperate parser/program to evaluate the
result. This is probably beyond the scope of modjk but I thought it good to
mention non the less for any interesting other ideas it might provoke.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 46676] Configurable test request for Watchdog thread

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46676





--- Comment #1 from Gerhardus Geldenhuis   
2009-02-09 03:46:47 PST ---
Original email from tomcat-users mailing list that prompted report:

Ping tests, whether there is something able to still process AJP on the 
other side of the connection. A configurable request would be able to 
talk to the application, so one could detect, whether it is still 
deployed, and if the request would be handled by an intelligent servlet 
it could respond with some sort of application layer health status.

Worth filing an enhancement request, since Mladen put the Watchdog 
thread into 1.2.27, we can easily add more logic of that type.

Regards,
Rainer


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742487 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-02-09 Thread remm
Author: remm
Date: Mon Feb  9 13:34:33 2009
New Revision: 742487

URL: http://svn.apache.org/viewvc?rev=742487&view=rev
Log:
- Votes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=742487&r1=742486&r2=742487&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  9 13:34:33 2009
@@ -157,4 +157,4 @@
 
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.1.txt
-  +1: jfclerem fhanik
+  +1: jfclere, fhanik, remm



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 46683] New: Typo on french´s localization file

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46683

   Summary: Typo on french´s localization file
   Product: Tomcat 6
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: trivial
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: flavio.cris...@gmail.com


There´s a typo on french´s localization file, here:
java/org/apache/catalina/loader/LocaStrings_fr.properties

Should be: LocalStrings_fr.properties
   ^Here


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742677 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:05:44 2009
New Revision: 742677

URL: http://svn.apache.org/viewvc?rev=742677&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570
When checking docBase against appBase, make sure we check for an exact match 
against the appBase

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=742677&r1=742676&r2=742677&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Feb  9 
19:05:44 2009
@@ -908,7 +908,7 @@
 }
 }
 
-if (docBase.startsWith(canonicalAppBase.getPath())) {
+if (docBase.startsWith(canonicalAppBase.getPath() + 
File.separatorChar)) {
 docBase = docBase.substring(canonicalAppBase.getPath().length());
 docBase = docBase.replace(File.separatorChar, '/');
 if (docBase.startsWith("/")) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742679 - in /tomcat: current/tc5.5.x/STATUS.txt tc6.0.x/trunk/STATUS.txt

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:09:14 2009
New Revision: 742679

URL: http://svn.apache.org/viewvc?rev=742679&view=rev
Log:
Propose fix for 38570

Modified:
tomcat/current/tc5.5.x/STATUS.txt
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=742679&r1=742678&r2=742679&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Mon Feb  9 19:09:14 2009
@@ -205,3 +205,10 @@
   http://svn.apache.org/viewvc?rev=740684&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570
+  When checking docBase against appBase, make sure we check for an exact match
+  against the appBase
+  http://svn.apache.org/viewvc?rev=742677&view=rev
+  +1: markt
+  -1: 

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=742679&r1=742678&r2=742679&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  9 19:09:14 2009
@@ -158,3 +158,10 @@
 * Make sure the 400 is returned to the browser. (like other connectors).
   http://people.apache.org/~jfclere/patches/patch400.1.txt
   +1: jfclere, fhanik, remm
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570
+  When checking docBase against appBase, make sure we check for an exact match
+  against the appBase
+  http://svn.apache.org/viewvc?rev=742677&view=rev
+  +1: markt
+  -1: 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 38570] if docBase path contains "webapps", a backslash is inserted

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38570


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




--- Comment #5 from Mark Thomas   2009-02-09 11:09:23 PST ---
I can recreate this with the latest 5.5.x and the issue appears to be present
in trunk and 6.0.x as well. I have applied the necessary fix to trunk and
proposed it for 6.0.x and 5.5.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 38950] Problem with WebappClassLoader in background thread

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38950


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||INVALID




--- Comment #6 from Mark Thomas   2009-02-09 11:10:06 PST ---
The original report  indicates that the class loader is not started when the
background thread tries to do some work. This strongly suggests that the
lifecycle of the background thread is not being managed correctly. In the
absence of a test case that demonstrates otherwise, I am closing this as
invalid.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742697 - /tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:39:40 2009
New Revision: 742697

URL: http://svn.apache.org/viewvc?rev=742697&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39013
When testing for invalid docBase, test for an exact match with the appBase dir

Modified:
tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=742697&r1=742696&r2=742697&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Mon Feb  9 
19:39:40 2009
@@ -1079,7 +1079,7 @@
 try {
 File current = new File(resources[j]);
 current = current.getCanonicalFile();
-if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + 
File.separator))
 || 
(current.getAbsolutePath().startsWith(configBase().getAbsolutePath( {
 if (log.isDebugEnabled())
 log.debug("Delete " + current);
@@ -1120,7 +1120,7 @@
 try {
 File current = new File(resources[j]);
 current = current.getCanonicalFile();
-if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + 
File.separator))
 || 
(current.getAbsolutePath().startsWith(configBase().getAbsolutePath( {
 if (log.isDebugEnabled())
 log.debug("Delete " + current);
@@ -1138,7 +1138,7 @@
 try {
 File current = new File(resources2[j]);
 current = current.getCanonicalFile();
-if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+if 
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + 
File.separator))
 || 
((current.getAbsolutePath().startsWith(configBase().getAbsolutePath())
  && 
(current.getAbsolutePath().endsWith(".xml") {
 if (log.isDebugEnabled())



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39013] Incorrect use of docBase from XML Context file deployment

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39013





--- Comment #4 from Mark Thomas   2009-02-09 11:42:16 PST ---
I've gone through HostConfig and appended File.separator where required. It
needs to be File.separator rather than '/'. I have applied the fix to trunk and
have proposed it for 6.0.x and 5.5.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742699 - in /tomcat: current/tc5.5.x/STATUS.txt tc6.0.x/trunk/STATUS.txt

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:42:22 2009
New Revision: 742699

URL: http://svn.apache.org/viewvc?rev=742699&view=rev
Log:
Propose fix for 39013

Modified:
tomcat/current/tc5.5.x/STATUS.txt
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=742699&r1=742698&r2=742699&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Mon Feb  9 19:42:22 2009
@@ -212,3 +212,10 @@
   http://svn.apache.org/viewvc?rev=742677&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39013
+  When testing for invalid docBase, test for an exact match with the appBase
+  dir
+  http://svn.apache.org/viewvc?rev=742697&view=rev
+  +1: markt
+  -1: 

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=742699&r1=742698&r2=742699&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  9 19:42:22 2009
@@ -165,3 +165,11 @@
   http://svn.apache.org/viewvc?rev=742677&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39013
+  When testing for invalid docBase, test for an exact match with the appBase
+  dir
+  http://svn.apache.org/viewvc?rev=742697&view=rev
+  +1: markt
+  -1: 
+



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39417] ApplicationDispatcher.unwrapRequest() should not assume request is an extension of ServletRequestWrapper

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39417


Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Comment #5 from Mark Thomas   2009-02-09 11:43:46 PST ---
Looking at the OPs stack trace, the request/response objects being passed in
are newly created objects rather than the originals or wrapped versions of the
originals. This is not allowed by the spec.

The proposed patch would also breach the spec.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39732] Tomcat as a service does not stop when JAXRPCServlet is loaded

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39732


Mark Thomas  changed:

   What|Removed |Added

   Severity|normal  |trivial
 Status|NEEDINFO|RESOLVED
 Resolution||INVALID




--- Comment #2 from Mark Thomas   2009-02-09 11:44:33 PST ---
Since there is no test case, I can only assume that the web application is not
cleaning up it's resources correctly. If you believe that this is a bug and you
have a test case, please feel free to re-open this issue and attach your test
case.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 40002] JULI Should Use Context ClassLoader for Formatter

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40002


Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WONTFIX




--- Comment #8 from Mark Thomas   2009-02-09 11:44:58 PST ---
I don't see how we can fix this in a JVM vendor neutral way. j.u.logging did
not consider the class loader hierarchy of a typical container. Whilst JULI
does go quite some way to address these issues, there are some things that
can't be addressed as the j.i.logging API doesn't support it.

Adding your formatters to the container is the best option until the
j.u.logging API exposes the necessary methods.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 40050] context XML file deleted when path is not readable

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40050


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||INVALID




--- Comment #5 from Mark Thomas   2009-02-09 11:45:11 PST ---
You need to turn off autoDeploy. If Tomcat detects that a war or dir has been
deleted and autoDeploy="true" it will undeploy (ie delete) all the associated
resources, including the context.xml file.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 40811] Context listeners called multiple times

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40811


Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Comment #9 from Mark Thomas   2009-02-09 11:45:30 PST ---
The issues reported above are all expected for the configurations used.

Generally, placing a dir or a war in a host's appBase and then also defining it
in server.xml with a path other than the path that is automatically derived
from the dir/war name will result in double deployment.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 41504] Illegal access: this web application instance has been stopped already

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41504


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||INVALID




--- Comment #9 from Mark Thomas   2009-02-09 11:45:57 PST ---
Closing this as an application issue. I haven't looked into what change around
5.5.12 may have caused this bug to start reporting errors.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742707 - in /tomcat/trunk/webapps/examples/WEB-INF/classes: ./ cal/ chat/ colors/ compressionFilters/ examples/ filters/

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:51:30 2009
New Revision: 742707

URL: http://svn.apache.org/viewvc?rev=742707&view=rev
Log:
Fix various Eclipse warnings.
Convert tabs to spaces.

Modified:
tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
tomcat/trunk/webapps/examples/WEB-INF/classes/SessionExample.java
tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java
tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java

tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java

tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilterTestServlet.java

tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ExampleTagBase.java
tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java

tomcat/trunk/webapps/examples/WEB-INF/classes/filters/RequestDumperFilter.java

tomcat/trunk/webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java

Modified: 
tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java?rev=742707&r1=742706&r2=742707&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java 
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java Mon 
Feb  9 19:51:30 2009
@@ -66,9 +66,9 @@
 
 out.println("" + title + "");
 out.println("");
-Enumeration e = request.getHeaderNames();
+Enumeration e = request.getHeaderNames();
 while (e.hasMoreElements()) {
-String headerName = (String)e.nextElement();
+String headerName = e.nextElement();
 String headerValue = request.getHeader(headerName);
 out.println("");
 out.println(HTMLFilter.filter(headerName));

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/SessionExample.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/SessionExample.java?rev=742707&r1=742706&r2=742707&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/SessionExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/SessionExample.java Mon Feb  
9 19:51:30 2009
@@ -52,12 +52,12 @@
 out.println("");
 
 // img stuff not req'd for source code html showing
-   // relative links everywhere!
+// relative links everywhere!
 
 // XXX
 // making these absolute till we work out the
 // addition of a PathInfo issue 
-   
+
 out.println("");
 out.println("");
@@ -83,9 +83,9 @@
 
 out.println("");
 out.println(rb.getString("sessions.data") + "");
-Enumeration names = session.getAttributeNames();
+Enumeration names = session.getAttributeNames();
 while (names.hasMoreElements()) {
-String name = (String) names.nextElement(); 
+String name = names.nextElement(); 
 String value = session.getAttribute(name).toString();
 out.println(HTMLFilter.filter(name) + " = " 
 + HTMLFilter.filter(value) + "");
@@ -93,7 +93,7 @@
 
 out.println("");
 out.print("");
 out.println(rb.getString("sessions.dataname"));
@@ -107,7 +107,7 @@
 
 out.println("GET based form:");
 out.print("");
 out.println(rb.getString("sessions.dataname"));
@@ -120,9 +120,9 @@
 out.println("");
 
 out.print("URL encoded ");
-   
+
out.print(response.encodeURL("SessionExample?dataname=foo&datavalue=bar"));
+out.println("\" >URL encoded ");
+
 out.println("");
 out.println("");
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java?rev=742707&r1=742706&r2=742707&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java Mon Feb  9 
19:51:30 2009
@@ -1,55 +1,54 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obt

DO NOT REPLY [Bug 39433] JAAS LoginModule handling ignores Principals and Credentials added to the Subject

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39433


Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from Mark Thomas   2009-02-09 11:43:59 PST ---
This should have been fixed in 5.5.27.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742708 - in /tomcat/trunk/test/org/apache/catalina/tribes: demos/ test/ test/channel/ test/interceptors/ test/io/ test/membership/ test/transport/

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:53:28 2009
New Revision: 742708

URL: http://svn.apache.org/viewvc?rev=742708&view=rev
Log:
Fix various Eclipse warnings.
Convert tabs to spaces.

Modified:
tomcat/trunk/test/org/apache/catalina/tribes/demos/CoordinationDemo.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/LoadTest.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/MapDemo.java
tomcat/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java

tomcat/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java

tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java

tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java

tomcat/trunk/test/org/apache/catalina/tribes/test/io/TestSenderConnections.java

tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java

tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java

tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java

tomcat/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java

tomcat/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java

tomcat/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/demos/CoordinationDemo.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/CoordinationDemo.java?rev=742708&r1=742707&r2=742708&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/tribes/demos/CoordinationDemo.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/demos/CoordinationDemo.java 
Mon Feb  9 19:53:28 2009
@@ -46,6 +46,7 @@
  * Construct and show the application.
  */
 public CoordinationDemo() {
+// Default constructor
 }
 
 public void init() {
@@ -312,7 +313,9 @@
 status = "Start failed:"+x.getMessage();
 error = x;
 startstatus = "failed";
-try { channel.stop(GroupChannel.DEFAULT);}catch(Exception 
ignore){}
+try { channel.stop(Channel.DEFAULT);}catch(Exception ignore){
+// Ignore
+}
 channel = null;
 interceptor = null;
 }
@@ -351,7 +354,9 @@
 int type = event.getEventType();
 boolean display = VIEW_EVENTS[type];
 if ( display ) parent.printScreen();
-try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){}
+try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
+// Ignore
+}
 }
 };
 channel.addInterceptor(interceptor);

Modified: tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java?rev=742708&r1=742707&r2=742708&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java Mon Feb 
 9 19:53:28 2009
@@ -96,8 +96,10 @@
 for ( int i=0; ihttp://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java?rev=742708&r1=742707&r2=742708&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
Mon Feb  9 19:53:28 2009
@@ -957,6 +957,7 @@
 try {
 result = new Integer(object);
 } catch (NumberFormatException ex) {
+// Ignore
 }
 // Try a setFoo ( boolean )
 } else if ("java.lang.Boolean".equals(paramType.getName())

Modified: tomcat/trunk/test/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/LoadTe

svn commit: r742709 - in /tomcat/trunk/java/javax: el/ servlet/ servlet/http/ servlet/jsp/ servlet/jsp/tagext/

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:55:29 2009
New Revision: 742709

URL: http://svn.apache.org/viewvc?rev=742709&view=rev
Log:
Fix various Eclipse warnings.
Convert tabs to spaces.

Modified:
tomcat/trunk/java/javax/el/ArrayELResolver.java
tomcat/trunk/java/javax/el/BeanELResolver.java
tomcat/trunk/java/javax/el/ListELResolver.java
tomcat/trunk/java/javax/servlet/GenericServlet.java
tomcat/trunk/java/javax/servlet/ServletInputStream.java
tomcat/trunk/java/javax/servlet/ServletOutputStream.java
tomcat/trunk/java/javax/servlet/SingleThreadModel.java
tomcat/trunk/java/javax/servlet/http/HttpServlet.java
tomcat/trunk/java/javax/servlet/http/HttpUtils.java
tomcat/trunk/java/javax/servlet/jsp/JspContext.java
tomcat/trunk/java/javax/servlet/jsp/JspEngineInfo.java
tomcat/trunk/java/javax/servlet/jsp/JspException.java
tomcat/trunk/java/javax/servlet/jsp/JspFactory.java
tomcat/trunk/java/javax/servlet/jsp/PageContext.java
tomcat/trunk/java/javax/servlet/jsp/tagext/BodyTagSupport.java
tomcat/trunk/java/javax/servlet/jsp/tagext/JspTag.java
tomcat/trunk/java/javax/servlet/jsp/tagext/PageData.java
tomcat/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
tomcat/trunk/java/javax/servlet/jsp/tagext/Tag.java
tomcat/trunk/java/javax/servlet/jsp/tagext/TagData.java
tomcat/trunk/java/javax/servlet/jsp/tagext/TagExtraInfo.java
tomcat/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java

Modified: tomcat/trunk/java/javax/el/ArrayELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ArrayELResolver.java?rev=742709&r1=742708&r2=742709&view=diff
==
--- tomcat/trunk/java/javax/el/ArrayELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ArrayELResolver.java Mon Feb  9 19:55:29 2009
@@ -45,10 +45,9 @@
int idx = coerce(property);
 if (idx < 0 || idx >= Array.getLength(base)) {
 return null;
-} else {
-return Array.get(base, idx);
 }
-   }
+return Array.get(base, idx);
+}
 
return null;
}

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=742709&r1=742708&r2=742709&view=diff
==
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Mon Feb  9 19:55:29 2009
@@ -207,9 +207,9 @@
}
 
 protected final static class BeanProperty {
-   private final Class type;
+   private final Class type;
 
-   private final Class owner;
+   private final Class owner;
 
private final PropertyDescriptor descriptor;
 
@@ -283,7 +283,7 @@
if (m == null || Modifier.isPublic(type.getModifiers())) {
return m;
}
-   Class[] inf = type.getInterfaces();
+   Class[] inf = type.getInterfaces();
Method mp = null;
for (int i = 0; i < inf.length; i++) {
try {
@@ -293,9 +293,10 @@
return mp;
}
} catch (NoSuchMethodException e) {
+   // Ignore
}
}
-   Class sup = type.getSuperclass();
+   Class sup = type.getSuperclass();
if (sup != null) {
try {
mp = sup.getMethod(m.getName(), 
m.getParameterTypes());
@@ -304,6 +305,7 @@
return mp;
}
} catch (NoSuchMethodException e) {
+   // Ignore
}
}
return null;

Modified: tomcat/trunk/java/javax/el/ListELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ListELResolver.java?rev=742709&r1=742708&r2=742709&view=diff
==
--- tomcat/trunk/java/javax/el/ListELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ListELResolver.java Mon Feb  9 19:55:29 2009
@@ -28,8 +28,8 @@
 
private final boolean readOnly;
 
-   private final static Class UNMODIFIABLE = Collections.unmodifiableList(
-   new ArrayList()).getClass();
+   private final static Class UNMODIFIABLE =
+   Collections.unmodifiableList(new ArrayList()).getClass();
 
public ListELResolver() {
this.readOnly = false;
@@ -47,7 +47,7 @@
 

svn commit: r742710 - /tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 19:56:44 2009
New Revision: 742710

URL: http://svn.apache.org/viewvc?rev=742710&view=rev
Log:
Correct typo

Modified:
tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java?rev=742710&r1=742709&r2=742710&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java Mon 
Feb  9 19:56:44 2009
@@ -197,7 +197,7 @@
 // Add our Principal to the Subject if needed
 if (!subject.getPrincipals().contains(principal)) {
 subject.getPrincipals().add(principal);
-// Add the roles as additional sudjucts as per the contract with 
the
+// Add the roles as additional subjects as per the contract with 
the
 // JAASRealm
 if (principal instanceof GenericPrincipal) {
 String roles[] = ((GenericPrincipal) principal).getRoles();



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742711 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 20:00:01 2009
New Revision: 742711

URL: http://svn.apache.org/viewvc?rev=742711&view=rev
Log:
Only perform validation test when allowLinking is enabled

Modified:
tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=742711&r1=742710&r2=742711&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Mon Feb  
9 20:00:01 2009
@@ -846,7 +846,7 @@
  * List the resources which are members of a collection.
  *
  * @param file Collection
- * @return Vector containg NamingEntry objects
+ * @return Vector containing NamingEntry objects
  */
 protected ArrayList list(File file) {
 
@@ -867,8 +867,11 @@
 
 for (int i = 0; i < names.length; i++) {
 
-File currentFile = validate(new File(file, names[i]));
-if (currentFile == null) continue;
+File currentFile = new File(file, names[i]);
+if (allowLinking) {
+currentFile = validate(currentFile);
+if (currentFile == null) continue;
+}
 
 Object object = null;
 if (currentFile.isDirectory()) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742713 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 20:06:07 2009
New Revision: 742713

URL: http://svn.apache.org/viewvc?rev=742713&view=rev
Log:
Revert previous patch. It won't work.

Modified:
tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=742713&r1=742712&r2=742713&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Mon Feb  
9 20:06:07 2009
@@ -846,7 +846,7 @@
  * List the resources which are members of a collection.
  *
  * @param file Collection
- * @return Vector containing NamingEntry objects
+ * @return Vector containg NamingEntry objects
  */
 protected ArrayList list(File file) {
 
@@ -867,11 +867,8 @@
 
 for (int i = 0; i < names.length; i++) {
 
-File currentFile = new File(file, names[i]);
-if (allowLinking) {
-currentFile = validate(currentFile);
-if (currentFile == null) continue;
-}
+File currentFile = validate(new File(file, names[i]));
+if (currentFile == null) continue;
 
 Object object = null;
 if (currentFile.isDirectory()) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742714 - in /tomcat/trunk/java/org/apache/catalina: connector/RequestFacade.java servlets/DefaultServlet.java

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 20:13:14 2009
New Revision: 742714

URL: http://svn.apache.org/viewvc?rev=742714&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39396
Exclude TRACE in OPTIONS response by default. Include it where we know it is 
enabled.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/RequestFacade.java
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/RequestFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/RequestFacade.java?rev=742714&r1=742713&r2=742714&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/RequestFacade.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/RequestFacade.java Mon Feb  
9 20:13:14 2009
@@ -994,4 +994,7 @@
 return null;
 }
 
+public boolean getAllowTrace() {
+return request.getConnector().getAllowTrace();
+}
 }

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=742714&r1=742713&r2=742714&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Mon Feb  
9 20:13:14 2009
@@ -56,6 +56,7 @@
 import javax.xml.transform.stream.StreamSource;
 
 import org.apache.catalina.Globals;
+import org.apache.catalina.connector.RequestFacade;
 import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.StringManager;
@@ -77,8 +78,7 @@
 
 public class DefaultServlet
 extends HttpServlet {
-
-
+
 // - Instance Variables
 
 
@@ -355,6 +355,49 @@
 
 
 /**
+ * Override default implementation to ensure that TRACE is correctly
+ * handled.
+ *
+ * @param req   the {...@link HttpServletRequest} object that
+ *  contains the request the client made of
+ *  the servlet
+ *
+ * @param resp  the {...@link HttpServletResponse} object that
+ *  contains the response the servlet returns
+ *  to the client
+ *
+ * @exception IOException   if an input or output error occurs
+ *  while the servlet is handling the
+ *  OPTIONS request
+ *
+ * @exception ServletException  if the request for the
+ *  OPTIONS cannot be handled
+ */
+protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+
+StringBuffer allow = new StringBuffer();
+// There is a doGet method
+allow.append("GET, HEAD");
+// There is a doPost
+allow.append(", POST");
+// There is a doPut
+allow.append(", PUT");
+// There is a doDelete
+allow.append(", POST");
+// Trace - assume disabled unless we can prove otherwise
+if (req instanceof RequestFacade &&
+((RequestFacade) req).getAllowTrace()) {
+allow.append(", TRACE");
+}
+// Always allow options
+allow.append(", OPTIONS");
+
+resp.setHeader("Allow", allow.toString());
+}
+
+
+/**
  * Process a POST request for the specified resource.
  *
  * @param request The servlet request we are processing



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r742718 - in /tomcat: current/tc5.5.x/STATUS.txt tc6.0.x/trunk/STATUS.txt

2009-02-09 Thread markt
Author: markt
Date: Mon Feb  9 20:20:22 2009
New Revision: 742718

URL: http://svn.apache.org/viewvc?rev=742718&view=rev
Log:
Propose fix for 39396

Modified:
tomcat/current/tc5.5.x/STATUS.txt
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=742718&r1=742717&r2=742718&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Mon Feb  9 20:20:22 2009
@@ -219,3 +219,10 @@
   http://svn.apache.org/viewvc?rev=742697&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39396
+  Don't include TRACEE in OPTIONS response unless we know it hasn't been
+  disabled in the connector
+  http://svn.apache.org/viewvc?rev=742714&view=rev
+  +1: markt
+  -1: 

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=742718&r1=742717&r2=742718&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  9 20:20:22 2009
@@ -173,3 +173,9 @@
   +1: markt
   -1: 
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39396
+  Don't include TRACEE in OPTIONS response unless we know it hasn't been
+  disabled in the connector
+  http://svn.apache.org/viewvc?rev=742714&view=rev
+  +1: markt
+  -1: 
\ No newline at end of file



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39396] OPTIONS request on directory with no default file reports an incorrect list of allowed HTTP verbs

2009-02-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39396





--- Comment #5 from Mark Thomas   2009-02-09 12:24:46 PST ---
Filip's point is that you get a 400 since you have no host header in your
request.

I have modified the default servlet to include TRACE in the Allow header based
on the setting of allowTrace for the connector associated with the request.
This change has been made to trunk and proposed for 6.0.x and 5.5.x.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org