[Bug 53869] Performance tuning solution to resolve too many cascaded JspContextWrapper issue

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53869

--- Comment #7 from Konstantin Kolinko knst.koli...@gmail.com ---
1. This change in JspContextWrapper constructor means that it will create EL
context regardless of whether it will be used or not:

+ this.elContext = rootJspCtxt.getELContext();

See PageContextImpl.getELContext(),
JspApplicationContextImpl.createELContext(..).

The EL Context creation operation involves using a PrivilegedAction and firing
an event through listeners. It is not cheap.

I think this change in behaviour is undesireable.


2. I do not expect much from your proposed optimization. Using a delegation is
a common pattern. Replacing 4 chained redirects with 1 redirect is not much of
a change.

3. If someone extends JspContextWrapper, its behaviour will be broken by this
change. (Is it a concern? Would anyone extend it? Isn't it Jasper internals?)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com ---
(In reply to comment #1)
 
 When processing the If-Modified-Since header in the DefaultServlet, Tomcat
 does follow RFC2616-14.25.a and effectively ignores the header.
 

I am REOPENing this. The DefaultServlet is OK and has the necessary try/catches
around getDateHeader() calls.

The problem is in javax.servlet.http.HttpServlet#service() where a try/catch is
missing.

I see two options: a) ignore the invalid header, like it is done by
DefaultServlet, b) silently fail with error 400. Failing with error 500 isn't
good.

-- 
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: r1408231 - /tomcat/tc6.0.x/branches/tomcat6-testing/

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 09:43:39 2012
New Revision: 1408231

URL: http://svn.apache.org/viewvc?rev=1408231view=rev
Log:
Create a branch from tc6.0.x/trunk with the goal to improve JUnit tests in 
Tomcat 6.

I'll add a BRANCH-README file with more details.

Added:
tomcat/tc6.0.x/branches/tomcat6-testing/   (props changed)
  - copied from r1408230, tomcat/tc6.0.x/trunk/

Propchange: tomcat/tc6.0.x/branches/tomcat6-testing/
--
--- svn:ignore (added)
+++ svn:ignore Mon Nov 12 09:43:39 2012
@@ -0,0 +1,7 @@
+.classpath
+.project
+.settings
+output
+build.properties
+work
+logs

Propchange: tomcat/tc6.0.x/branches/tomcat6-testing/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Nov 12 09:43:39 2012
@@ -0,0 +1,3 @@
+/tomcat/tc6.0.x/trunk:1224802
+/tomcat/tc7.0.x/trunk:1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1354866
+/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,77
 
0809,770876,772872,776921,776924,776935,776945,777464,777466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,789389,790405,791041,791184,791194,791224,791243,791326,791328,791789,792740,793372,793757,793882,793981,794082,794673,794822,795043,795152,795210,795457,795466,797168,797425,797596,797607,802727,802940,804462,804544,804734,805153,809131,809603,810916,810977,812125,812137,812432,813001,813013,813866,814180,814708,814876,815972,816252,817442,817822,819339,819361,820110,820132,820874,820954,821397,828196,828201,828210,828225,828759,830378-830379,830999,831106,831774,831785,831828,831850,831860,832214,832218,833121,833545,834047,835036,835336,836405,881396,881412,883130,883134,883146,883165,883177,883362,883565,884341,885038,885231,885241,885260,885901,885991,886019,888072,889363,889606,889716,8901
 
39,890265,890349-890350,890417,891185-891187,891583,892198,892341,892415,892464,892555,892812,892814,892817,892843,892887,893321,893493,894580,894586,894805,894831,895013,895045,895057,895191,895392,895703,896370,896384,897380-897381,897776,898126,898256,898468,898527,898555,898558,898718,898836,898906,899284,899348,899420,899653,899769-899770,899783,899788,899792,899916,899918-899919,899935,899949,903916,905020,905151,905722,905728,905735,907311,907513,907538,907652,907819,907825,907864,908002,908721,908754,908759,909097,909206,909212,909525,909636,909869,909875,909887,910266,910370,910442,910471,910485,910974,915226,915737,915861,916097,916141,916157,916170,917598,917633,918093,918489,918594,918684,918787,918792,918799,918803,918885,919851,919914,920025,920055,920298,920449,920596,920824,920840,921444,922010,926716,927062,927621,928482,928695,928732,928798,931709,932357,932967,935105,935983,939491,939551,940064,941356,941463,943112,944409,944416,945231,945808,945835,945841
 
,946686,948057,950164,950596,950614,950851,950905,951615,953434,954435,955648,955655,956832,957130,957830,958192,960701,961948,962865,962872,962881,962900,963106,963865,963868,964614,966177-966178,966292,966692,966863,981815,988448,991837,993042,1001955,1002185,1002263,1002274,1002349,1002359,1002362,1002481,1002514,1003461,1003481,1003488,1003556,1003572,1003581,1003861,1004393,1004409,1004415,1004868-1004869,1004912,1005452,1005467,1005647,1005802,1022120,1022134,1022323,1022415,1022606,1022623,1024224,1024251,1026042,1026784,1026912,1026920,1029767,1033415,1033448,1033842,1033897,1037715,1037794,1037887,1037924,1038041,1042022,1042029,1042447,1042452,1042494,1044944,1044987,1050249,1055055,1055236,1055458,1055975,1056264,1056828,1056889,1059881,1060486,1061412,1061442,1061446,1062398,1064652,1066244,1066772,1067039,1067139,1069824,1070139,1070420,1070609,1072042,1073393,1075458,1076212,1078409,1078412,1079801,1081334,1088179,1088460,1090022,1094069,1094089,1095138,1097899
 

svn commit: r1408239 - /tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 10:12:27 2012
New Revision: 1408239

URL: http://svn.apache.org/viewvc?rev=1408239view=rev
Log:
BRANCH-README file.

Added:
tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt   (with props)

Added: tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt?rev=1408239view=auto
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt (added)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt Mon Nov 12 
10:12:27 2012
@@ -0,0 +1,34 @@
+This branch is created with the goal to improve JUnit tests in Tomcat 6.
+
+It is maintained as a reintegrate-able branch with regular catch-up
+merges from tc6.0.x/trunk.
+
+Created: 2012-11-12 from r1408230
+Last catch-up merge: none yet
+
+
+TODO:
+
+ * Backport support for running JUnit tests to the main /build.xml
+   file from Tomcat 7. Add target name=test.[Not 
Started]
+
+ * Drop useless test/build.xml  [Not 
Started]
+
+ * Review existing tests, align with Tomcat 7, convert to JUnit 4.  [Not 
Started]
+
+ * Update BUILDING.txt. [Not 
Started]
+
+ * The results at this point can be proposed to be merged back to
+   tc6.0.x/trunk.
+
+ * Maybe it will be possible to backport the tests that start a Tomcat
+   server instance, using an idea from [1]. [Not 
Started]
+
+   [1]  http://tomcat.markmail.org/thread/ko7ip7obvyaftwe4
+
+ * Configure Apache Gump to run the tests.  [Not 
Started]
+
+
+(Regarding BRANCH-README files - see Apache Subversion Community Guide
+ http://subversion.apache.org/docs/community-guide/general.html#branch-policy
+)

Propchange: tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt
--
svn:eol-style = native

Propchange: tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt
--
svn:mime-type = text/plain



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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

sivaram sivaramprasa...@gmail.com changed:

   What|Removed |Added

   Severity|critical|blocker

--- Comment #1 from sivaram sivaramprasa...@gmail.com ---
We are facing this issue when the IIS recycle happens. This is a show stopper
for our Website.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 52850] Various miscellaneous fixes to Tomcat Memory Leak Detection code

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52850

--- Comment #14 from vijay vijay.1...@gmail.com ---
I have Tomcat 7.0 running. Where can I download this patch so that I can
install on the server?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087

--- Comment #3 from Mark Thomas ma...@apache.org ---
Thanks for catching that. I should have read the stack trace more carefully.

-- 
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: r1408248 - /tomcat/trunk/java/javax/servlet/http/HttpServlet.java

2012-11-12 Thread markt
Author: markt
Date: Mon Nov 12 11:32:26 2012
New Revision: 1408248

URL: http://svn.apache.org/viewvc?rev=1408248view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54087
Ignore invalid If-Modified-Since header as per RFC2616-14.25.a

Modified:
tomcat/trunk/java/javax/servlet/http/HttpServlet.java

Modified: tomcat/trunk/java/javax/servlet/http/HttpServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServlet.java?rev=1408248r1=1408247r2=1408248view=diff
==
--- tomcat/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServlet.java Mon Nov 12 11:32:26 
2012
@@ -620,7 +620,13 @@ public abstract class HttpServlet extend
 // to go through further expensive logic
 doGet(req, resp);
 } else {
-long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+long ifModifiedSince;
+try {
+ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+} catch (IllegalArgumentException iae) {
+// Invalid date header - proceed as if none was set
+ifModifiedSince = -1;
+}
 if (ifModifiedSince  (lastModified / 1000 * 1000)) {
 // If the servlet mod time is later, call doGet()
 // Round down to the nearest second for a proper compare



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



svn commit: r1408254 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/http/HttpServlet.java webapps/docs/changelog.xml

2012-11-12 Thread markt
Author: markt
Date: Mon Nov 12 11:43:27 2012
New Revision: 1408254

URL: http://svn.apache.org/viewvc?rev=1408254view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54087
Ignore invalid If-Modified-Since header as per RFC2616-14.25.a

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1408248

Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java?rev=1408254r1=1408253r2=1408254view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java Mon Nov 12 
11:43:27 2012
@@ -620,7 +620,13 @@ public abstract class HttpServlet extend
 // to go through further expensive logic
 doGet(req, resp);
 } else {
-long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+long ifModifiedSince;
+try {
+ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+} catch (IllegalArgumentException iae) {
+// Invalid date header - proceed as if none was set
+ifModifiedSince = -1;
+}
 if (ifModifiedSince  (lastModified / 1000 * 1000)) {
 // If the servlet mod time is later, call doGet()
 // Round down to the nearest second for a proper compare

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1408254r1=1408253r2=1408254view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Nov 12 11:43:27 2012
@@ -113,6 +113,10 @@
 (markt) 
   /fix
   fix
+bug54087/bug: Correctly handle (ignore) invalid If-Modified-Since
+header rather than throwing an exception. (markt)
+  /fix
+  fix
 bug54096/bug: In web.xml, lt;env-entrygt; should accept any type
 that has a constructor that takes a single String or char. (markt)
   /fix



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



buildbot success in ASF Buildbot on tomcat-trunk

2012-11-12 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3551

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1408248
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087

--- Comment #4 from Mark Thomas ma...@apache.org ---
Fixed in trunk and 7.0.x and will be included in 7.0.33 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54116] Deadlocks with mysql driver

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54116

--- Comment #3 from Patric Rufflar pat...@rufflar.com ---
The pool cleaner thread periodically 
- checks for abandoned connections (depending on configuration)
- does pool resizing (e.g. dropping connections), if necessary
- verifies idle connections (depending on configuration)

If this thread gets blocked you'll loose this functionality.
It depends on your application if you rely on these features or not.
Normally, this will not cause your application to fail (completely).

If I were you I would drop a comment at the existing mysql issue and tell them
that they use inconsistent locking in their jdbc driver which is causing the
problem here.
Also mention that Connection.abort() is only available in java 7. 
If they will not fix the inconsistent locking ask for a java 6 compatible
solution.

BTW: A workaround which will lower the probability of the deadlock is to
disable the jdbc-pool's remove abandoned connections feature.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-11-12 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 179 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 25 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 

[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

--- Comment #2 from Mladen Turk mt...@apache.org ---
Could you post your workers.properties file.
... and is it 1.2.36 or 1.2.37? If it's 1.2.36 use 1.2.37

-- 
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: r1408376 - in /tomcat/tc6.0.x/branches/tomcat6-testing: build.xml dist.xml extras.xml

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 17:52:20 2012
New Revision: 1408376

URL: http://svn.apache.org/viewvc?rev=1408376view=rev
Log:
Introduce property tomcat.output that is used to specify location of the 
build output directory.
This simplifies configuration when the output directory is located outside of 
the source tree.
(One would have to define a single property instead of several ones).

Modified:
tomcat/tc6.0.x/branches/tomcat6-testing/build.xml
tomcat/tc6.0.x/branches/tomcat6-testing/dist.xml
tomcat/tc6.0.x/branches/tomcat6-testing/extras.xml

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/build.xml?rev=1408376r1=1408375r2=1408376view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/build.xml (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/build.xml Mon Nov 12 17:52:20 2012
@@ -53,10 +53,11 @@
 
   !-- Build Defaults --
   property name=tomcat.home   value=${basedir}/
-  property name=tomcat.build  value=${basedir}/output/build/
-  property name=tomcat.classesvalue=${basedir}/output/classes/
-  property name=tomcat.dist   value=${basedir}/output/dist/
-  property name=tomcat.manifests  value=${basedir}/output/manifests/
+  property name=tomcat.output value=${basedir}/output/
+  property name=tomcat.build  value=${tomcat.output}/build/
+  property name=tomcat.classesvalue=${tomcat.output}/classes/
+  property name=tomcat.dist   value=${tomcat.output}/dist/
+  property name=tomcat.manifests  value=${tomcat.output}/manifests/
   property name=test.failonerror  value=true/
   property name=test.runner   value=junit.textui.TestRunner/
 

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/dist.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/dist.xml?rev=1408376r1=1408375r2=1408376view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/dist.xml (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/dist.xml Mon Nov 12 17:52:20 2012
@@ -54,12 +54,13 @@
   property name=final-src.namevalue=${project}-${version}-src /
 
   !-- Build Defaults --
-  property name=tomcat.build  value=${basedir}/output/build/
-  property name=tomcat.classesvalue=${basedir}/output/classes/
-  property name=tomcat.dist   value=${basedir}/output/dist/
-  property name=tomcat.deployer   value=${basedir}/output/deployer/
-  property name=tomcat.extras value=${basedir}/output/extras/
-  property name=tomcat.releasevalue=${basedir}/output/release/
+  property name=tomcat.output value=${basedir}/output/
+  property name=tomcat.build  value=${tomcat.output}/build/
+  property name=tomcat.classesvalue=${tomcat.output}/classes/
+  property name=tomcat.dist   value=${tomcat.output}/dist/
+  property name=tomcat.deployer   value=${tomcat.output}/deployer/
+  property name=tomcat.extras value=${tomcat.output}/extras/
+  property name=tomcat.releasevalue=${tomcat.output}/release/
   property name=test.failonerror  value=true/
   property name=test.runner   value=junit.textui.TestRunner/
 

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/extras.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/extras.xml?rev=1408376r1=1408375r2=1408376view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/extras.xml (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/extras.xml Mon Nov 12 17:52:20 2012
@@ -54,13 +54,14 @@
   property name=final-src.namevalue=${project}-${version}-src /
 
   !-- Build Defaults --
-  property name=tomcat.build  value=${basedir}/output/build/
-  property name=tomcat.classesvalue=${basedir}/output/classes/
-  property name=tomcat.dist   value=${basedir}/output/dist/
-  property name=tomcat.extras value=${basedir}/output/extras/
-  property name=tomcat.manifests  value=${basedir}/output/manifests/
-  property name=tomcat.deployer   value=${basedir}/output/deployer/
-  property name=tomcat.releasevalue=${basedir}/output/release/
+  property name=tomcat.output value=${basedir}/output/
+  property name=tomcat.build  value=${tomcat.output}/build/
+  property name=tomcat.classesvalue=${tomcat.output}/classes/
+  property name=tomcat.dist   value=${tomcat.output}/dist/
+  property name=tomcat.extras value=${tomcat.output}/extras/
+  property name=tomcat.manifests  value=${tomcat.output}/manifests/
+  property name=tomcat.deployer   value=${tomcat.output}/deployer/
+  property name=tomcat.releasevalue=${tomcat.output}/release/
   property name=test.failonerror  value=true/
   property name=test.runner   value=junit.textui.TestRunner/
 




svn commit: r1408413 - in /tomcat/tc6.0.x/branches/tomcat6-testing: BRANCH-README.txt build.properties.default build.xml

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 19:24:17 2012
New Revision: 1408413

URL: http://svn.apache.org/viewvc?rev=1408413view=rev
Log:
Add support for running JUnit tests. Backport from Tomcat 7.

Modified:
tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt
tomcat/tc6.0.x/branches/tomcat6-testing/build.properties.default
tomcat/tc6.0.x/branches/tomcat6-testing/build.xml

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt?rev=1408413r1=1408412r2=1408413view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/BRANCH-README.txt Mon Nov 12 
19:24:17 2012
@@ -10,7 +10,17 @@ Last catch-up merge: none yet
 TODO:
 
  * Backport support for running JUnit tests to the main /build.xml
-   file from Tomcat 7. Add target name=test.[Not 
Started]
+   file from Tomcat 7. Add target name=test.[Done]
+
+   Notes:
+ - The  if=${execute.test.bio} construct requires Ant = 1.8.0
+   http://ant.apache.org/manual/properties.html#if+unless
+
+ - Separate test-bio, test-nio, test-apr targets are there,
+   but they do not make much sense as the tests do not start Tomcat.
+
+ - test.jvmarg.egd=-Djava.security.egd=file:/dev/./urandom
+   property was not ported, as it is not needed for Tomcat 6.
 
  * Drop useless test/build.xml  [Not 
Started]
 

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/build.properties.default?rev=1408413r1=1408412r2=1408413view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/build.properties.default (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/build.properties.default Mon Nov 12 
19:24:17 2012
@@ -43,6 +43,19 @@ compile.source=1.5
 compile.target=1.5
 compile.debug=true
 
+# - Build control flags -
+# Note enabling validation uses Checkstyle which is LGPL licensed
+execute.validate=false
+execute.test.bio=true
+execute.test.nio=true
+# Still requires APR/native library to be present
+execute.test.apr=true
+# Stop testing if a failure occurs
+test.haltonfailure=false
+# Activate AccessLog during testing
+test.accesslog=false
+
+
 base-apache.loc.1=http://www.apache.org/dist
 base-apache.loc.2=http://archive.apache.org/dist
 base-commons.loc.1=${base-apache.loc.1}/commons
@@ -159,3 +172,9 @@ commons-daemon.native.src.loc.1=${base-c
 
commons-daemon.native.src.loc.2=${base-commons.loc.2}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz
 
commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
 
commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
+
+# - JUnit Unit Test Suite, version 4.8 or later -
+junit.home=${base.path}/junit4.8.2
+junit.lib=${junit.home}
+junit.jar=${junit.lib}/junit-4.8.2.jar
+junit.loc=http://cloud.github.com/downloads/KentBeck/junit/junit4.8.2.zip

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/build.xml?rev=1408413r1=1408412r2=1408413view=diff
==
--- tomcat/tc6.0.x/branches/tomcat6-testing/build.xml (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/build.xml Mon Nov 12 19:24:17 2012
@@ -58,8 +58,9 @@
   property name=tomcat.classesvalue=${tomcat.output}/classes/
   property name=tomcat.dist   value=${tomcat.output}/dist/
   property name=tomcat.manifests  value=${tomcat.output}/manifests/
-  property name=test.failonerror  value=true/
-  property name=test.runner   value=junit.textui.TestRunner/
+  property name=test.classes  value=${tomcat.output}/testclasses/
+  property name=test.temp value=${tomcat.output}/test-tmp/
+  property name=test.apr.loc  value=${tomcat.build}/bin/native/
 
   !-- Can't be lower - jsp uses templates --
   property name=compile.source value=1.5/
@@ -93,12 +94,28 @@
   available property=tomcat-dbcp.present file=${tomcat-dbcp.jar} /
   available property=jdk16.present classname=javax.sql.StatementEvent /
 
+  !-- Tests To Run --
+  property name=test.name value=**/Test*.java/
+  property name=test.formatter 
value=-Dorg.apache.juli.formatter=java.util.logging.SimpleFormatter/
+
   !-- Classpath --
-  path id=tomcat.classpath
+  path id=compile.classpath
 pathelement location=${ant.jar}/
 pathelement location=${jdt.jar}/
   /path
 
+  path id=tomcat.classpath
+

svn commit: r1408438 - in /tomcat/trunk/test/org/apache: catalina/valves/TestAccessLogValve.java juli/TestDateFormatCache.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 20:17:58 2012
New Revision: 1408438

URL: http://svn.apache.org/viewvc?rev=1408438view=rev
Log:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
Add test for org.apache.juli.DateFormatCache.
It is port of the test of AccessLogValve.DateFormatCache.
I am using reflection to get interesting fields, so no need to change field 
visibilities.

Added:
tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java   (with props)
Modified:
tomcat/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java

Modified: tomcat/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java?rev=1408438r1=1408437r2=1408438view=diff
==
--- tomcat/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java Mon 
Nov 12 20:17:58 2012
@@ -26,6 +26,8 @@ import org.junit.Test;
 
 public class TestAccessLogValve {
 
+// Note that there is a similar test:
+// org.apache.juli.TestDateFormatCache.testBug54044()
 @Test
 public void testBug54044() throws Exception {
 
@@ -77,7 +79,7 @@ public class TestAccessLogValve {
 expected[0] = generateExpected(sdf, 0);
 Assert.assertArrayEquals(expected, dfc.cLFCache.cache);
 
-// Jump ahead far enough that the entire cache will need tp be cleared
+// Jump ahead far enough that the entire cache will need to be cleared
 dfc.getFormat(42 * 1000);
 for (int i = 0; i  cacheSize; i++) {
 expected[i] = null;

Added: tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java?rev=1408438view=auto
==
--- tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java (added)
+++ tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java Mon Nov 12 
20:17:58 2012
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juli;
+
+import java.lang.reflect.Field;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestDateFormatCache {
+
+// Note that there is a similar test:
+// org.apache.catalina.valves.TestAccessLogValve.testBug54044()
+@Test
+public void testBug54044() throws Exception {
+
+final String timeFormat = dd-MMM- HH:mm:ss;
+final int cacheSize = 10;
+
+SimpleDateFormat sdf = new SimpleDateFormat(timeFormat, Locale.US);
+sdf.setTimeZone(TimeZone.getDefault());
+
+DateFormatCache dfc = new DateFormatCache(cacheSize, timeFormat, null);
+
+// Get dfc.cache.cache field
+Object dfcCache;
+Field dfcCacheArray;
+{
+Field dfcCacheField = dfc.getClass().getDeclaredField(cache);
+dfcCacheField.setAccessible(true);
+dfcCache = dfcCacheField.get(dfc);
+dfcCacheArray = dfcCache.getClass().getDeclaredField(cache);
+dfcCacheArray.setAccessible(true);
+}
+
+// Create an array to hold the expected values
+String[] expected = new String[cacheSize];
+
+// Fill the cache  populate the expected values
+for (int secs = 0; secs  (cacheSize); secs++) {
+dfc.getFormat(secs * 1000);
+expected[secs] = generateExpected(sdf, secs);
+}
+Assert.assertArrayEquals(expected,
+(String[]) dfcCacheArray.get(dfcCache));
+
+// Cause the cache to roll-around by one and then confirm
+dfc.getFormat(cacheSize * 1000);
+expected[0] = generateExpected(sdf, cacheSize);
+Assert.assertArrayEquals(expected,
+(String[]) dfcCacheArray.get(dfcCache));
+
+// Jump 2 ahead and then confirm (skipped value should be null)
+dfc.getFormat((cacheSize + 2) * 1000);
+expected[1] = 

svn commit: r1408439 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/valves/TestAccessLogValve.java test/org/apache/juli/TestDateFormatCache.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 20:21:17 2012
New Revision: 1408439

URL: http://svn.apache.org/viewvc?rev=1408439view=rev
Log:
Merged revision 1408438 from tomcat/trunk:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
Add test for org.apache.juli.DateFormatCache.
It is port of the test of AccessLogValve.DateFormatCache.
I am using reflection to get interesting fields, so no need to change field 
visibilities.

Added:
tomcat/tc7.0.x/trunk/test/org/apache/juli/TestDateFormatCache.java
  - copied unchanged from r1408438, 
tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1408438

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java?rev=1408439r1=1408438r2=1408439view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java 
Mon Nov 12 20:21:17 2012
@@ -26,6 +26,8 @@ import org.junit.Test;
 
 public class TestAccessLogValve {
 
+// Note that there is a similar test:
+// org.apache.juli.TestDateFormatCache.testBug54044()
 @Test
 public void testBug54044() throws Exception {
 
@@ -77,7 +79,7 @@ public class TestAccessLogValve {
 expected[0] = generateExpected(sdf, 0);
 Assert.assertArrayEquals(expected, dfc.cLFCache.cache);
 
-// Jump ahead far enough that the entire cache will need tp be cleared
+// Jump ahead far enough that the entire cache will need to be cleared
 dfc.getFormat(42 * 1000);
 for (int i = 0; i  cacheSize; i++) {
 expected[i] = null;



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



svn commit: r1408453 - /tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 20:45:59 2012
New Revision: 1408453

URL: http://svn.apache.org/viewvc?rev=1408453view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
Test for org.apache.juli.DateFormatCache, copied from trunk.
That test is currently failing, which means that BZ 54044 affects this cache in 
Tomcat 6.

The fix is ready and will be committed separately.

Added:

tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.java
  - copied, changed from r1408439, 
tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java

Copied: 
tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.java
 (from r1408439, tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.java?p2=tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.javap1=tomcat/trunk/test/org/apache/juli/TestDateFormatCache.javar1=1408439r2=1408453rev=1408453view=diff
==
--- tomcat/trunk/test/org/apache/juli/TestDateFormatCache.java (original)
+++ 
tomcat/tc6.0.x/branches/tomcat6-testing/test/org/apache/juli/TestDateFormatCache.java
 Mon Nov 12 20:45:59 2012
@@ -27,8 +27,6 @@ import org.junit.Test;
 
 public class TestDateFormatCache {
 
-// Note that there is a similar test:
-// org.apache.catalina.valves.TestAccessLogValve.testBug54044()
 @Test
 public void testBug54044() throws Exception {
 



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



svn commit: r1408459 - /tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 21:04:28 2012
New Revision: 1408459

URL: http://svn.apache.org/viewvc?rev=1408459view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
Correct bug in timestamp cache used by org.apache.juli.OneLineFormatter
that meant entries could be made with an earlier timestamp than the true 
timestamp.

It is backport of r1402624 of TC7 (r1402622 of trunk)

Modified:

tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java

Modified: 
tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java?rev=1408459r1=1408458r2=1408459view=diff
==
--- 
tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java
 (original)
+++ 
tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/juli/DateFormatCache.java
 Mon Nov 12 21:04:28 2012
@@ -101,14 +101,14 @@ public class DateFormatCache {
 private class Cache {
 
 /* Second formatted in most recent invocation */
-private long previousSeconds = 0L;
+private long previousSeconds = Long.MIN_VALUE;
 /* Formatted timestamp generated in most recent invocation */
 private String previousFormat = ;
 
 /* First second contained in cache */
-private long first = 0L;
+private long first = Long.MIN_VALUE;
 /* Last second contained in cache */
-private long last = 0L;
+private long last = Long.MIN_VALUE;
 /* Index of first in the cyclic cache */
 private int offset = 0;
 /* Helper object to be able to call SimpleDateFormat.format(). */
@@ -165,14 +165,16 @@ public class DateFormatCache {
 for (int i = 1; i  seconds - last; i++) {
 cache[(index + cacheSize - i) % cacheSize] = null;
 }
-first = seconds - cacheSize;
+first = seconds - (cacheSize - 1);
 last = seconds;
+offset = (index + 1) % cacheSize;
 } else if (seconds  first) {
 for (int i = 1; i  first - seconds; i++) {
 cache[(index + i) % cacheSize] = null;
 }
 first = seconds;
-last = seconds + cacheSize;
+last = seconds + (cacheSize - 1);
+offset = index;
 }
 
 /* Last step: format new timestamp either using



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



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

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 21:13:26 2012
New Revision: 1408462

URL: http://svn.apache.org/viewvc?rev=1408462view=rev
Log:
proposals

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=1408462r1=1408461r2=1408462view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Nov 12 21:13:26 2012
@@ -93,6 +93,36 @@ PATCHES PROPOSED TO BACKPORT:
   +1: schultz
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
+  Correct bug in timestamp cache used by org.apache.juli.OneLineFormatter
+  that meant entries could be made with an earlier timestamp than the true 
timestamp.
+  (The test was added to tomcat6-testing branch in r1408453)
+  http://svn.apache.org/viewvc?view=revisionrevision=1408459
+  +1: kkolinko
+  -1:
+
+* In FormAuthenticator: If it is configured to change Session IDs,
+  do the change before displaying the login form.
+  http://svn.apache.org/viewvc?view=revisionrevision=1408044
+  (r1408043 in trunk)
+  +1: kkolinko
+  -1:
+
+* Introduce property tomcat.output that is used to specify location of
+  the build output directory. This simplifies build configuration when the
+  output directory is located outside of the source tree.
+  http://svn.apache.org/viewvc?view=revisionrevision=1408376
+  +1: kkolinko
+  -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54087
+  Correctly handle (ignore) invalid If-Modified-Since
+  header rather than throwing an exception.
+  http://svn.apache.org/viewvc?view=revisionrevision=1408254
+  (r1408248 in trunk, by markt)
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



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



[Bug 54044] AccessLogValve using stale date/time with SimpleDateFormat

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54044

--- Comment #8 from Konstantin Kolinko knst.koli...@gmail.com ---
This issue affects the cache used by org.apache.juli.OneLineFormatter in Tomcat
6.

The AccessLogValve is not affected (it does not have such cache there).
Other JULI components are not affected.

I proposed the patch (r1408459) for Tomcat 6.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087

--- Comment #5 from Konstantin Kolinko knst.koli...@gmail.com ---
I proposed the patch (r1408254) for Tomcat 6.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 53869] Performance tuning solution to resolve too many cascaded JspContextWrapper issue

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53869

--- Comment #8 from Mark Thomas ma...@apache.org ---
To get performance improvements above has required 5 levels of nesting and 10^7
iterations. That works out to around 50 nanoseconds per request.

I am far from convinced that the test case used to justify this changes
represents a typical use case.

I share Konstantin's concerns regarding the ELContext.

I do not believe folks would be extending JspContextWrapper.

Without a better justification for this change, I am leaning towards WONTFIX.

-- 
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: r1408504 - in /tomcat/trunk: java/org/apache/catalina/filters/CsrfPreventionFilter.java webapps/docs/config/filter.xml

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 23:25:57 2012
New Revision: 1408504

URL: http://svn.apache.org/viewvc?rev=1408504view=rev
Log:
Allow to customize the HTTP status code used for denied requests in 
CsrfPreventionFilter.

Modified:
tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java
tomcat/trunk/webapps/docs/config/filter.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java?rev=1408504r1=1408503r2=1408504view=diff
==
--- tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java Mon 
Nov 12 23:25:57 2012
@@ -57,6 +57,8 @@ public class CsrfPreventionFilter extend
 
 private Random randomSource;
 
+private int denyStatus = HttpServletResponse.SC_FORBIDDEN;
+
 private final SetString entryPoints = new HashSet();
 
 private int nonceCacheSize = 5;
@@ -67,6 +69,24 @@ public class CsrfPreventionFilter extend
 }
 
 /**
+ * Return response status code that is used to reject denied request.
+ */
+public int getDenyStatus() {
+return denyStatus;
+}
+
+/**
+ * Set response status code that is used to reject denied request. If none
+ * set, the default value of 403 will be used.
+ *
+ * @param denyStatus
+ *HTTP status code
+ */
+public void setDenyStatus(int denyStatus) {
+this.denyStatus = denyStatus;
+}
+
+/**
  * Entry points are URLs that will not be tested for the presence of a 
valid
  * nonce. They are used to provide a way to navigate back to a protected
  * application after navigating away from it. Entry points will be limited
@@ -166,7 +186,7 @@ public class CsrfPreventionFilter extend
 
 if (nonceCache == null || previousNonce == null ||
 !nonceCache.contains(previousNonce)) {
-res.sendError(HttpServletResponse.SC_FORBIDDEN);
+res.sendError(denyStatus);
 return;
 }
 }

Modified: tomcat/trunk/webapps/docs/config/filter.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/filter.xml?rev=1408504r1=1408503r2=1408504view=diff
==
--- tomcat/trunk/webapps/docs/config/filter.xml (original)
+++ tomcat/trunk/webapps/docs/config/filter.xml Mon Nov 12 23:25:57 2012
@@ -131,6 +131,11 @@
 
 attributes
 
+  attribute name=denyStatus required=false
+pHTTP response status code that is used when rejecting denied
+request. The default value is code403/code./p
+  /attribute
+
   attribute name=entryPoints required=false
 pA comma separated list of URLs that will not be tested for the
 presence of a valid nonce. They are used to provide a way to navigate



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



svn commit: r1408507 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java

2012-11-12 Thread olamy
Author: olamy
Date: Mon Nov 12 23:30:25 2012
New Revision: 1408507

URL: http://svn.apache.org/viewvc?rev=1408507view=rev
Log:
we add artifact dependencies and projects from reactor if file (ie jar) as 
users can go to install/package phase
so artifact.getFile is a file not a directory and not added when iterate on 
project.classPathElements

Modified:

tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java

Modified: 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1408507r1=1408506r2=1408507view=diff
==
--- 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
 (original)
+++ 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
 Mon Nov 12 23:30:25 2012
@@ -45,7 +45,7 @@ import java.util.Set;
  * @author Olivier Lamy
  * @since 2.0
  */
-@Component( role = ClassLoaderEntriesCalculator.class )
+@Component (role = ClassLoaderEntriesCalculator.class)
 public class DefaultClassLoaderEntriesCalculator
 implements ClassLoaderEntriesCalculator
 {
@@ -66,7 +66,7 @@ public class DefaultClassLoaderEntriesCa
 // add classes directories to loader
 try
 {
-@SuppressWarnings( unchecked ) ListString classPathElements = 
request.isUseTestClassPath()
+@SuppressWarnings (unchecked) ListString classPathElements = 
request.isUseTestClassPath()
 ? request.getMavenProject().getTestClasspathElements()
 : request.getMavenProject().getCompileClasspathElements();
 if ( classPathElements != null )
@@ -113,7 +113,10 @@ public class DefaultClassLoaderEntriesCa
 request.getLog().debug(
 add dependency to webapploader  + 
artifact.getGroupId() + : + artifact.getArtifactId() + :
 + artifact.getVersion() + : + 
artifact.getScope() );
-if ( !isInProjectReferences( artifact, 
request.getMavenProject() ) )
+// we add artifact dependencies and projects from reactor 
if file (ie jar) as users can go to install/package phase
+// so artifact.getFile is a file not a directory and not 
added when iterate on project.classPathElements
+if ( !isInProjectReferences( artifact, 
request.getMavenProject() ) || ( artifact.getFile().exists()
+ artifact.getFile().isFile() ) )
 {
 String fileName = artifact.getFile().getName();
 if ( !fileInClassLoaderEntries.contains( fileName ) )
@@ -126,6 +129,7 @@ public class DefaultClassLoaderEntriesCa
 {
 request.getLog().debug(
 skip adding artifact  + artifact.getArtifactId() 
+  as it's in reactors );
+
 }
 }
 
@@ -217,7 +221,7 @@ public class DefaultClassLoaderEntriesCa
 {
 return false;
 }
-@SuppressWarnings( unchecked ) CollectionMavenProject 
mavenProjects =
+@SuppressWarnings (unchecked) CollectionMavenProject mavenProjects 
=
 project.getProjectReferences().values();
 for ( MavenProject mavenProject : mavenProjects )
 {



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



svn commit: r1408508 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/filters/CsrfPreventionFilter.java webapps/docs/changelog.xml webapps/docs/config/filter.xml

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Mon Nov 12 23:41:21 2012
New Revision: 1408508

URL: http://svn.apache.org/viewvc?rev=1408508view=rev
Log:
Merged revision 1408504 from tomcat/trunk:
Allow to customize the HTTP status code used for denied requests in 
CsrfPreventionFilter.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/filter.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1408504

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java?rev=1408508r1=1408507r2=1408508view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
Mon Nov 12 23:41:21 2012
@@ -57,6 +57,8 @@ public class CsrfPreventionFilter extend
 
 private Random randomSource;
 
+private int denyStatus = HttpServletResponse.SC_FORBIDDEN;
+
 private final SetString entryPoints = new HashSetString();
 
 private int nonceCacheSize = 5;
@@ -67,6 +69,24 @@ public class CsrfPreventionFilter extend
 }
 
 /**
+ * Return response status code that is used to reject denied request.
+ */
+public int getDenyStatus() {
+return denyStatus;
+}
+
+/**
+ * Set response status code that is used to reject denied request. If none
+ * set, the default value of 403 will be used.
+ *
+ * @param denyStatus
+ *HTTP status code
+ */
+public void setDenyStatus(int denyStatus) {
+this.denyStatus = denyStatus;
+}
+
+/**
  * Entry points are URLs that will not be tested for the presence of a 
valid
  * nonce. They are used to provide a way to navigate back to a protected
  * application after navigating away from it. Entry points will be limited
@@ -167,7 +187,7 @@ public class CsrfPreventionFilter extend
 
 if (nonceCache == null || previousNonce == null ||
 !nonceCache.contains(previousNonce)) {
-res.sendError(HttpServletResponse.SC_FORBIDDEN);
+res.sendError(denyStatus);
 return;
 }
 }

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1408508r1=1408507r2=1408508view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Nov 12 23:41:21 2012
@@ -143,6 +143,11 @@
 codejavax.servlet.async.request_uri/code and add missing request
 attribute codejavax.servlet.async.path_info/code. (markt)
   /fix
+  add
+Add codedenyStatus/code initialization parameter to
+codeCsrfPreventionFilter/code, allowing to customize the HTTP
+status code used for denied requests. (kkolinko)
+  /add
 /changelog
   /subsection
   subsection name=Coyote

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/filter.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/filter.xml?rev=1408508r1=1408507r2=1408508view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/filter.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/filter.xml Mon Nov 12 23:41:21 2012
@@ -131,6 +131,11 @@
 
 attributes
 
+  attribute name=denyStatus required=false
+pHTTP response status code that is used when rejecting denied
+request. The default value is code403/code./p
+  /attribute
+
   attribute name=entryPoints required=false
 pA comma separated list of URLs that will not be tested for the
 presence of a valid nonce. They are used to provide a way to navigate



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



Re: svn commit: r1408507 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java

2012-11-12 Thread Konstantin Kolinko
2012/11/13  ol...@apache.org:
 Author: olamy
 Date: Mon Nov 12 23:30:25 2012
 New Revision: 1408507

 URL: http://svn.apache.org/viewvc?rev=1408507view=rev
 Log:
 we add artifact dependencies and projects from reactor if file (ie jar) as 
 users can go to install/package phase
 so artifact.getFile is a file not a directory and not added when iterate on 
 project.classPathElements

 Modified:
 
 tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java


 @@ -113,7 +113,10 @@ public class DefaultClassLoaderEntriesCa
  request.getLog().debug(
  add dependency to webapploader  + 
 artifact.getGroupId() + : + artifact.getArtifactId() + :
  + artifact.getVersion() + : + 
 artifact.getScope() );
 -if ( !isInProjectReferences( artifact, 
 request.getMavenProject() ) )
 +// we add artifact dependencies and projects from 
 reactor if file (ie jar) as users can go to install/package phase
 +// so artifact.getFile is a file not a directory and not 
 added when iterate on project.classPathElements
 +if ( !isInProjectReferences( artifact, 
 request.getMavenProject() ) || ( artifact.getFile().exists()
 + artifact.getFile().isFile() ) )
  {
  String fileName = artifact.getFile().getName();
  if ( !fileInClassLoaderEntries.contains( fileName ) )


Сalling both artifact.getFile().exists() 
artifact.getFile().isFile() is redundant.

The File.isFile() method does check for existence of the file.

Best regards,
Konstantin Kolinko

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



svn commit: r1408513 - /tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 00:08:18 2012
New Revision: 1408513

URL: http://svn.apache.org/viewvc?rev=1408513view=rev
Log:
Correct typo in a field name.
(Review of r1408157 )

Modified:
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408513r1=1408512r2=1408513view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Tue Nov 
13 00:08:18 2012
@@ -93,7 +93,7 @@ public abstract class SimpleHttpClient {
 private String redirectUri;
 
 private String responseBody;
-private ListString bodyUriElments = new ArrayList();
+private ListString bodyUriElements = new ArrayList();
 
 protected void setPort(int thePort) {
 port = thePort;
@@ -139,7 +139,7 @@ public abstract class SimpleHttpClient {
 }
 
 public ListString getResponseBodyUriElements() {
-return bodyUriElments;
+return bodyUriElements;
 }
 
 public void setUseContentLength(boolean b) {
@@ -211,7 +211,7 @@ public abstract class SimpleHttpClient {
 // clear any residual data before starting on this response
 responseHeaders.clear();
 responseBody = null;
-bodyUriElments.clear();
+bodyUriElements.clear();
 
 // Read the response status line
 responseLine = readLine();
@@ -332,7 +332,7 @@ public abstract class SimpleHttpClient {
 + ELEMENT_TAIL + ]\nActual: [ + body + ]);
 }
 String element = body.substring(iStart, iEnd);
-bodyUriElments.add(element);
+bodyUriElements.add(element);
 iStart += element.length();
 }
 return iStart;



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



svn commit: r1408517 - /tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 00:33:25 2012
New Revision: 1408517

URL: http://svn.apache.org/viewvc?rev=1408517view=rev
Log:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=53960
Review of r1402846:
If someone needs the extractUriElements() method, one has to call it explicitly.
So that
a) we do not waste time in 90% of tests where this info is not needed,
b) we do not waste time if the response is not HTML.

Modified:
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408517r1=1408516r2=1408517view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Tue Nov 
13 00:33:25 2012
@@ -93,7 +93,7 @@ public abstract class SimpleHttpClient {
 private String redirectUri;
 
 private String responseBody;
-private ListString bodyUriElements = new ArrayList();
+private ListString bodyUriElements = null;
 
 protected void setPort(int thePort) {
 port = thePort;
@@ -138,6 +138,17 @@ public abstract class SimpleHttpClient {
 return responseBody;
 }
 
+/**
+ * Return opening tags of HTML elements that were extracted by the
+ * {@link #extractUriElements()} method.
+ *
+ * p
+ * Note, that {@link #extractUriElements()} method has to be called
+ * explicitly.
+ *
+ * @return List of HTML tags, accumulated by {@link #extractUriElements()}
+ * method, or {@code null} if the method has not been called yet.
+ */
 public ListString getResponseBodyUriElements() {
 return bodyUriElements;
 }
@@ -292,20 +303,29 @@ public abstract class SimpleHttpClient {
 }
 }
 responseBody = builder.toString();
-extractUriElements(responseBody);
 }
 
-/*
- * Scan an html body for useful html uri elements. If any are found,
- * then accumulate them. Test classes might not use them, but they
- * are collected anyway.
+/**
+ * Scan the response body for opening tags of certain HTML elements
+ * (lt;agt;, lt;formgt;). If any are found, then accumulate them.
+ *
+ * p
+ * Note: This method has the following limitations: a) It assumes that the
+ * response is HTML. b) It searches for lowercase tags only. 
+ *
+ * @see #getResponseBodyUriElements()
  */
-private void extractUriElements(String body) {
-if (body.length()  0) {
+public void extractUriElements() {
+bodyUriElements = new ArrayList();
+if (responseBody.length()  0) {
 int ix = 0;
-while ((ix = extractUriElement(body, ix, RESOURCE_TAG))  0){}
+while ((ix = extractUriElement(responseBody, ix, RESOURCE_TAG))  
0){
+// loop
+}
 ix = 0;
-while ((ix = extractUriElement(body, ix, LOGIN_TAG))  0){}
+while ((ix = extractUriElement(responseBody, ix, LOGIN_TAG))  0){
+// loop
+}
 }
 }
 



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



svn commit: r1408520 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/startup/SimpleHttpClient.java webapps/docs/changelog.xml

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 00:42:33 2012
New Revision: 1408520

URL: http://svn.apache.org/viewvc?rev=1408520view=rev
Log:
Merged revisions r1408513 r1408517 from tomcat/trunk:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=53960
Review of r1402846, r1408157
- Correct typo in a field name.
- Remove call to extractUriElements() from processBody() method.
If someone needs the extractUriElements() method, one has to call it 
explicitly. The method was made public.
So that
a) we do not waste time in 90% of tests where this info is not needed,
b) we do not waste time if the response is not HTML.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1408513-1408517

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408520r1=1408519r2=1408520view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
Tue Nov 13 00:42:33 2012
@@ -93,7 +93,7 @@ public abstract class SimpleHttpClient {
 private String redirectUri;
 
 private String responseBody;
-private ListString bodyUriElments = new ArrayListString();
+private ListString bodyUriElements = null;
 
 protected void setPort(int thePort) {
 port = thePort;
@@ -138,8 +138,19 @@ public abstract class SimpleHttpClient {
 return responseBody;
 }
 
+/**
+ * Return opening tags of HTML elements that were extracted by the
+ * {@link #extractUriElements()} method.
+ *
+ * p
+ * Note, that {@link #extractUriElements()} method has to be called
+ * explicitly.
+ *
+ * @return List of HTML tags, accumulated by {@link #extractUriElements()}
+ * method, or {@code null} if the method has not been called yet.
+ */
 public ListString getResponseBodyUriElements() {
-return bodyUriElments;
+return bodyUriElements;
 }
 
 public void setUseContentLength(boolean b) {
@@ -211,7 +222,7 @@ public abstract class SimpleHttpClient {
 // clear any residual data before starting on this response
 responseHeaders.clear();
 responseBody = null;
-bodyUriElments.clear();
+bodyUriElements.clear();
 
 // Read the response status line
 responseLine = readLine();
@@ -292,20 +303,29 @@ public abstract class SimpleHttpClient {
 }
 }
 responseBody = builder.toString();
-extractUriElements(responseBody);
 }
 
-/*
- * Scan an html body for useful html uri elements. If any are found,
- * then accumulate them. Test classes might not use them, but they
- * are collected anyway.
+/**
+ * Scan the response body for opening tags of certain HTML elements
+ * (lt;agt;, lt;formgt;). If any are found, then accumulate them.
+ *
+ * p
+ * Note: This method has the following limitations: a) It assumes that the
+ * response is HTML. b) It searches for lowercase tags only. 
+ *
+ * @see #getResponseBodyUriElements()
  */
-private void extractUriElements(String body) {
-if (body.length()  0) {
+public void extractUriElements() {
+bodyUriElements = new ArrayListString();
+if (responseBody.length()  0) {
 int ix = 0;
-while ((ix = extractUriElement(body, ix, RESOURCE_TAG))  0){}
+while ((ix = extractUriElement(responseBody, ix, RESOURCE_TAG))  
0){
+// loop
+}
 ix = 0;
-while ((ix = extractUriElement(body, ix, LOGIN_TAG))  0){}
+while ((ix = extractUriElement(responseBody, ix, LOGIN_TAG))  0){
+// loop
+}
 }
 }
 
@@ -332,7 +352,7 @@ public abstract class SimpleHttpClient {
 + ELEMENT_TAIL + ]\nActual: [ + body + ]);
 }
 String element = body.substring(iStart, iEnd);
-bodyUriElments.add(element);
+bodyUriElements.add(element);
 iStart += element.length();
 }
 return iStart;

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1408520r1=1408519r2=1408520view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Nov 13 00:42:33 

[Bug 53960] Extensions to HttpClient test helper class

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53960

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com ---
Note that I removed the extractUriElements() from within the processBody()
method.

The response body might be not HTML, and in =90% of test cases this
information is not needed by the test.

The extractUriElements() method was made public so that you can call it
explicitly.

See r1408520

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1408152 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/coyote/ test/org/apache/catalina/core/ webapps/docs/

2012-11-12 Thread Konstantin Kolinko
2012/11/12  ma...@apache.org:
 Author: markt
 Date: Sun Nov 11 23:35:41 2012
 New Revision: 1408152

 URL: http://svn.apache.org/viewvc?rev=1408152view=rev
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54123
 There are two things going on here:
 1. The reported bug. If there is a async timeout and no async listeners, 
 trigger a 500 response.
 2. Implement error dispatch. This is used a couple of times in the spec 
 without any definition. The implication from the part of the spec quoted in 
 the bug report is:
- The standard error page mechanism should be used to identify the page
- An async request that has been started should be left in async mode when 
 forwarding to the error page
- The error page may call complete() or dispatch()
 This commit hooks into the StandardHostValve to access the error page 
 mechanism. I could have copied and pasted but I preferred the dependency on 
 StandardHostValve
 Because the error page may do a dispatch(), need to ensure that when running 
 the dispatch(), the error page mechanism is not triggered a second time.
 Depending on what emerges running the full unit tests and the TCK, I mat 
 still decide to copy the error page code to AsyncContextImpl

 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
 tomcat/tc7.0.x/trunk/java/org/apache/coyote/AsyncStateMachine.java
 
 tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 Propchange: tomcat/tc7.0.x/trunk/
 --
   Merged /tomcat/trunk:r1408148

 Modified: 
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
 URL: 
 http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1408152r1=1408151r2=1408152view=diff
 ==
 --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
 (original)
 +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
 Sun Nov 11 23:35:41 2012
 @@ -41,6 +41,8 @@ import javax.servlet.http.HttpServletRes
  import org.apache.catalina.AsyncDispatcher;
  import org.apache.catalina.Context;
  import org.apache.catalina.Globals;
 +import org.apache.catalina.Host;
 +import org.apache.catalina.Valve;
  import org.apache.catalina.connector.Request;
  import org.apache.coyote.ActionCode;
  import org.apache.coyote.AsyncContextCallback;
 @@ -128,8 +130,8 @@ public class AsyncContextImpl implements
  ActionCode.ASYNC_IS_TIMINGOUT, result);
  return !result.get();
  } else {
 -// No listeners, container calls complete
 -complete();
 +// No listeners, trigger error handling
 +return false;
  }

  } finally {
 @@ -372,6 +374,23 @@ public class AsyncContextImpl implements
  listener.getClass().getName() + ], ioe);
  }
  }


The spec in 2.3.3.3 says If none of the listeners called
AsyncContext.complete or any of the AsyncContext.dispatch methods,
then perform an error dispatch

As far as I see, the code below is executed unconditionally, but the
spec says that it has to be executed only if the listeners did not do
the calls

 +
 +// SRV.2.3.3.3 (search for error dispatch)
 +if (servletResponse instanceof HttpServletResponse) {
 +((HttpServletResponse) servletResponse).setStatus(
 +HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 +}
 +
 +Host host = (Host) context.getParent();
 +Valve stdHostValve = host.getPipeline().getBasic();
 +if (stdHostValve instanceof StandardHostValve) {
 +((StandardHostValve) stdHostValve).throwable(request,
 +request.getResponse(), t);
 +}
 +
 +if (isStarted()  !request.isAsyncDispatching()) {
 +complete();
 +}
  }



 Modified: 
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
 URL: 
 http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1408152r1=1408151r2=1408152view=diff
 ==
 --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java 
 (original)
 +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java 
 Sun Nov 11 23:35:41 2012
 @@ -161,6 +161,9 @@ final class StandardHostValve extends Va
  // If a request init listener throws an exception, the request is
  // aborted
  

Re: svn commit: r1408150 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/AsyncContextImpl.java webapps/docs/changelog.xml

2012-11-12 Thread Konstantin Kolinko
2012/11/12  ma...@apache.org:
 Author: markt
 Date: Sun Nov 11 23:32:43 2012
 New Revision: 1408150

 URL: http://svn.apache.org/viewvc?rev=1408150view=rev
 Log:
 both timeout and complete, as with all container callbacks must be invoked 
 with the right context
 Backport of fhanik's r1356898


1. The change only takes care of timeout().
What about complete (fireOnComplete()) that is mentioned in the commit
message and in the changelog?

2. I wonder what about running with SecurityManager. (Well, timeout()
is probably called by Tomcat code, so there might be no concern, or
maybe you will notice it while running TCK).

There is already ready-to-use class AsyncContextImpl$PrivilegedSetTccl(..).

Best regards,
Konstantin Kolinko


 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 Propchange: tomcat/tc7.0.x/trunk/
 --
   Merged /tomcat/trunk:r1356898

 Modified: 
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
 URL: 
 http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1408150r1=1408149r2=1408150view=diff
 ==
 --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
 (original)
 +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
 Sun Nov 11 23:32:43 2012
 @@ -110,21 +110,30 @@ public class AsyncContextImpl implements
  request.getCoyoteRequest().action(ActionCode.ASYNC_TIMEOUT, result);

  if (result.get()) {
 -boolean listenerInvoked = false;
 -ListAsyncListenerWrapper listenersCopy =
 -new ArrayListAsyncListenerWrapper();
 -listenersCopy.addAll(listeners);
 -for (AsyncListenerWrapper listener : listenersCopy) {
 -listener.fireOnTimeout(event);
 -listenerInvoked = true;
 -}
 -if (listenerInvoked) {
 -request.getCoyoteRequest().action(
 -ActionCode.ASYNC_IS_TIMINGOUT, result);
 -return !result.get();
 -} else {
 -// No listeners, container calls complete
 -complete();
 +
 +ClassLoader oldCL = 
 Thread.currentThread().getContextClassLoader();
 +ClassLoader newCL = 
 request.getContext().getLoader().getClassLoader();
 +try {
 +Thread.currentThread().setContextClassLoader(newCL);
 +boolean listenerInvoked = false;
 +ListAsyncListenerWrapper listenersCopy =
 +new ArrayListAsyncListenerWrapper();
 +listenersCopy.addAll(listeners);
 +for (AsyncListenerWrapper listener : listenersCopy) {
 +listener.fireOnTimeout(event);
 +listenerInvoked = true;
 +}
 +if (listenerInvoked) {
 +request.getCoyoteRequest().action(
 +ActionCode.ASYNC_IS_TIMINGOUT, result);
 +return !result.get();
 +} else {
 +// No listeners, container calls complete
 +complete();
 +}
 +
 +} finally {
 +Thread.currentThread().setContextClassLoader(oldCL);
  }
  }
  return true;

 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
 URL: 
 http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1408150r1=1408149r2=1408150view=diff
 ==
 --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
 +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Nov 11 23:32:43 2012
 @@ -118,6 +118,11 @@
  In FormAuthenticator: If it is configured to change Session IDs,
  do the change before displaying the login form. (kkolinko)
/fix
 +  fix
 +Ensure codeAsyncListener.timeout()/code and
 +codeAsyncListener.complete()/code are called with the correct
 +thread context class loader. (fhanik)
 +  /fix
  /changelog
/subsection
subsection name=Coyote


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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2012-11-12 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/911

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1408520
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



buildbot failure in ASF Buildbot on tomcat-trunk

2012-11-12 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3555

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1408517
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





[Bug 54141] New: Configuration does not allow Realms to be nested more than 2 levels deep

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54141

  Priority: P2
Bug ID: 54141
  Assignee: dev@tomcat.apache.org
   Summary: Configuration does not allow Realms to be nested more
than 2 levels deep
  Severity: normal
Classification: Unclassified
OS: Mac OS X 10.4
  Reporter: ch...@christopherschultz.net
  Hardware: PC
Status: NEW
   Version: 7.0.32
 Component: Catalina
   Product: Tomcat 7

The use case is to have one Realm that is configured for lock-out with another
that is not: the two should be combined together.

The obvious configuration attempt is this:

CombinedRealm
  LockoutRealm
 DataSourceRealm/
  /LockoutRealm
  UserDatabaseRealm/
/CombinedRealm

Unfortunately, this configuration yields an error:

  No rules found matching 'Server/Service/Engine/Realm/Realm/Realm'

org.apache.catalina.startup.RealmRuleSet.addRuleInstances only goes 2 levels
deep when it comes to Realms (that is, only allows Realm and Realm/Realm).
Adding a 3rd level would certainly work here and might be sufficient. Another
option would be to configure the digester to allow arbitrary levels of
Realm-nesting for even the most pathological cases.

For reference, see this link to a question over on StackOverflow:
http://stackoverflow.com/questions/13274696/tomcat-7-nesting-combinedrealm-lockoutrealm-and-datasourcerealm

-- 
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: r1408562 - /tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 02:42:25 2012
New Revision: 1408562

URL: http://svn.apache.org/viewvc?rev=1408562view=rev
Log:
Fix an NPE caused by r1408517

Modified:
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408562r1=1408561r2=1408562view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Tue Nov 
13 02:42:25 2012
@@ -222,7 +222,9 @@ public abstract class SimpleHttpClient {
 // clear any residual data before starting on this response
 responseHeaders.clear();
 responseBody = null;
-bodyUriElements.clear();
+if (bodyUriElements != null) {
+bodyUriElements.clear();
+}
 
 // Read the response status line
 responseLine = readLine();



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



svn commit: r1408565 - /tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 02:56:14 2012
New Revision: 1408565

URL: http://svn.apache.org/viewvc?rev=1408565view=rev
Log:
Fix trailing whitespace, as nagged by Checkstyle

Modified:
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408565r1=1408564r2=1408565view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Tue Nov 
13 02:56:14 2012
@@ -313,7 +313,7 @@ public abstract class SimpleHttpClient {
  *
  * p
  * Note: This method has the following limitations: a) It assumes that the
- * response is HTML. b) It searches for lowercase tags only. 
+ * response is HTML. b) It searches for lowercase tags only.
  *
  * @see #getResponseBodyUriElements()
  */



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



svn commit: r1408566 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/startup/SimpleHttpClient.java

2012-11-12 Thread kkolinko
Author: kkolinko
Date: Tue Nov 13 02:58:35 2012
New Revision: 1408566

URL: http://svn.apache.org/viewvc?rev=1408566view=rev
Log:
Merged revisions r1408562 r1408565 from tomcat/trunk:
Fix an NPE caused by r1408520
Fix trailing whitespace, as nagged by Checkstyle

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1408562-1408565

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1408566r1=1408565r2=1408566view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
Tue Nov 13 02:58:35 2012
@@ -222,7 +222,9 @@ public abstract class SimpleHttpClient {
 // clear any residual data before starting on this response
 responseHeaders.clear();
 responseBody = null;
-bodyUriElements.clear();
+if (bodyUriElements != null) {
+bodyUriElements.clear();
+}
 
 // Read the response status line
 responseLine = readLine();
@@ -311,7 +313,7 @@ public abstract class SimpleHttpClient {
  *
  * p
  * Note: This method has the following limitations: a) It assumes that the
- * response is HTML. b) It searches for lowercase tags only. 
+ * response is HTML. b) It searches for lowercase tags only.
  *
  * @see #getResponseBodyUriElements()
  */



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



buildbot success in ASF Buildbot on tomcat-trunk

2012-11-12 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3557

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1408565
Blamelist: kkolinko

Build succeeded!

sincerely,
 -The Buildbot





[Bug 54117] access violation exception in isapi_redirect.dll

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54117

--- Comment #11 from Werner werner.pe...@charteredaccountants.com.au ---
Created attachment 29593
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=29593action=edit
headers

The attachment shows the 46 header values when the process crashes obtained
from a full crash dump and debugging with Visual Studio using the 1.2.38 pdb,
but 1.2.37 jk_ajp.common.c file. The last of the headers is at address
0x.
Hope this helps.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54117] access violation exception in isapi_redirect.dll

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54117

--- Comment #12 from Mladen Turk mt...@apache.org ---
This is huge help, thanks!

Seems your application is faulty, but that shouldn't cause the crash. Let me
try to fix that and I'll attach a new .dll

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54117] access violation exception in isapi_redirect.dll

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54117

Mladen Turk mt...@apache.org changed:

   What|Removed |Added

  Attachment #29571|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

--- Comment #3 from sivaram sivaramprasa...@gmail.com ---

isapi_redirect.dll file version - 1.2.36

worker.properties.minimal file

# The workers that jk should create and work with
#

worker.list=lb,jk-status

#
# Defining a worker named node1 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.node1.type=ajp13
worker.node1.host=localhost
worker.node1.port=8009

#
# Defining a load balancer
# 

worker.lb.type=lb
worker.lb.balance_workers=node1

#
# Define status worker
#

worker.jk-status.type=status

worker.properties file.

# Define two status worker:
# - jk-status for read-only use
# - jk-manager for read/write use
worker.list=jk-status
worker.jk-status.type=status
worker.jk-status.read_only=true

worker.list=jk-manager
worker.jk-manager.type=status

# We define a load balancer worker
# with name balancer
worker.list=balancer
worker.balancer.type=lb
# error_escalation_time: seconds, default = recover_time/2 (=30)
# Determines, how fast a detected error should switch from
# local error state to global error state
# Since: 1.2.28
worker.balancer.error_escalation_time=0

# - max_reply_timeouts: number, default=0
#   If there are to many reply timeouts, a worker
#   is put into the error state, i.e. it will become
#   unavailable for all sessions residing on the respective
#   Tomcat. The number of tolerated reply timeouts is
#   configured with max_reply_timeouts. The number of
#   timeouts occuring is divided by 2 once a minute and the
#   resulting counter is compared against max_reply_timeouts.
#   If you set max_reply_timeouts to N and the errors are
#   occuring equally distributed over time, you will
#   tolerate N/2 errors per minute. If they occur in a burst
#   you will tolerate N errors.
#   Since: 1.2.24
worker.balancer.max_reply_timeouts=10



# Now we add members to the load balancer
# First member is node1, most
# attributes are inherited from the
# template worker.template.
worker.balancer.balance_workers=node1
worker.node1.reference=worker.template
worker.node1.host=localhost
worker.node1.port=8109
# Activation allows to configure
# whether this node should actually be used
# A: active (use node fully)
# D: disabled (only use, if sticky session needs this node)
# S: stopped (do not use)
#   Since: 1.2.19
worker.node1.activation=A

# Second member is node2, most
# attributes are inherited from the
# template worker.template.
worker.balancer.balance_workers=node2
worker.node2.reference=worker.template
worker.node2.host=localhost
worker.node2.port=8209
# Activation allows to configure
# whether this node should actually be used
# A: active (use node fully)
# D: disabled (only use, if sticky session needs this node)
# S: stopped (do not use)
#   Since: 1.2.19
worker.node2.activation=A

# Finally we put the parameters
# which should apply to all our ajp13
# workers into the referenced template
# - Type is ajp13
worker.template.type=ajp13

# - socket_connect_timeout: milliseconds, default=0
#   Since: 1.2.27
worker.template.socket_connect_timeout=5000

# - socket_keepalive: boolean, default=false
#   Should we send TCP keepalive packets
#   when connection is idle (socket option)?
worker.template.socket_keepalive=true

# - ping_mode: Character, default=none
#   When should we use cping/cpong connection probing?
#   C = directly after establishing a new connection
#   P = directly before sending each request
#   I = in regular intervals for idle connections
#   using the watchdog thread
#   A = all of the above
#   Since: 1.2.27
worker.template.ping_mode=A

# - ping_timeout: milliseconds, default=1
#   Wait timeout for cpong after cping
#   Can be overwritten for modes C and P
#   Using connect_timeout and prepost_timeout.
#   Since: 1.2.27
worker.template.ping_timeout=1

# - connection_pool_minsize: number, default=connection_pool_size
#   Lower pool size when shrinking pool due
#   to idle connections
#   We want all connections to be closed when
#   idle for a long time in order to prevent
#   firewall problems.
#   Since: 1.2.16
worker.template.connection_pool_minsize=0

# - connection_pool_timeout: seconds, default=0
#   Idle time, before a connection is eligible
#   for being closed (pool shrinking).
#   This should be the same value as connectionTimeout
#   in the Tomcat AJP connector, but there it is
#   milliseconds, here seconds.
worker.template.connection_pool_timeout=600

# - reply_timeout: milliseconds, default=0
#   Any pause longer than this timeout during waiting
#   for a part of the reply will abort handling the request
#   in mod_jk. The request will proceed running in
#   Tomcat, but the web server resources will be freed
#   and an error is send to the 

[Bug 54117] access violation exception in isapi_redirect.dll

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54117

--- Comment #13 from Mladen Turk mt...@apache.org ---
Created attachment 29594
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=29594action=edit
isapi_redirect-1.2.38-dev-v2-win64

Please try with this version. It should have more reliable header parser

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

Mladen Turk mt...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Mladen Turk mt...@apache.org ---
(In reply to comment #3)
 
 worker.list=lb,jk-status
...
 worker.list=jk-status
...
 worker.list=jk-manager
...
 worker.list=balancer
...

Wow, what a pile of trash.
So how many workers you actually have and for what?
I'll just close this case, and you can seek guidance on users list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

sivaram sivaramprasa...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---
 OS|All |Windows Server 2008

--- Comment #5 from sivaram sivaramprasa...@gmail.com ---
Hi,
Sorry I posted the incorrect data in my previous comment.
We have configured worker.properties.minimal file and the details are below.
We are using ISAPI redirector file version - 1.2.36


worker.properties.minimal file

# The workers that jk should create and work with
#

worker.list=lb,jk-status

#
# Defining a worker named node1 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.node1.type=ajp13
worker.node1.host=localhost
worker.node1.port=8009

#
# Defining a load balancer
# 

worker.lb.type=lb
worker.lb.balance_workers=node1

#
# Define status worker
#

worker.jk-status.type=status

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

Mladen Turk mt...@apache.org changed:

   What|Removed |Added

 OS||All

--- Comment #6 from Mladen Turk mt...@apache.org ---
Like said, please try with latest (1.2.37)
It has fixed bug in shared memory address sequence which should relate to the
bug you are seeing.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 54112] ISAPI redirector not working when IIS recycles

2012-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54112

--- Comment #7 from sivaram sivaramprasa...@gmail.com ---
Thank You, I will try to use the latest version of Jakarta plugin and let you
know the updates.

-- 
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