Re: svn commit: r511252 - in /tomcat/connectors/trunk/jk/native/iis: Makefile.amd64 Makefile.vc isapi.dsp jk_isapi_plugin.c

2007-02-25 Thread William A. Rowe, Jr.
Mladen Turk wrote:
> William A. Rowe, Jr. wrote:
>> GOOD GOD you can't be serious :)
>>
>> strncat strncpy exist for a reason, C's been safe for decades if
>> only the correct functions are chosen :)
>>
> 
> Didn't say it's wrong or something like that,
> but beside constantly fighting with hacking
> and suppressing newest MS compilers security presumptions,
> I see nothing wrong of using provided SDK functions
> for MS only related code.

My 2c - since MS doesn't want to play in C POSIX land and work with
the appropriate spec bodies, but would rather invent their unique
mindset (again) and work against the communities, I'm rather partial
to ignoring their 'security overtures'.

Fortunately I've seen some blog feedback to the effect that 'we made
a mistake with this draconian change' or words to that effect, so
hopefully VC 8.1 might see some course correction.

FWIW there is some community source licensing and portable implementation
around this MS Strings Lib, but that doesn't really change my opinion.
The reason against this commit is that you break older ms clibs (which
is precisely what they would like you to do.)

Bill

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Let's get 5.5.21 out the door...

2007-02-25 Thread William A. Rowe, Jr.
William A. Rowe, Jr. wrote:
> 
> Small misunderstanding to clear up here;

Mea culpa - glad this was clarified earlier, gotta catch up on
archives from most-recent first I see :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Let's get 5.5.21 out the door...

2007-02-25 Thread William A. Rowe, Jr.
Mark Thomas wrote:
> 
> Given that a -1 vote is not valid for a release vote, as soon as we
> have 3 +1's from the PMC we can release. 

Small misunderstanding to clear up here;

  -1 is a legitimate vote

  There must be 3 more +1's than -1's (and at least 3 +1's as you say)

  A -1 is NOT a veto for releasing a tarball, which is probably what
  you ment to say, or where your confusion came from.

Yours,

Bill

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug report for Tomcat 5 [2007/02/25]

2007-02-25 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|22679|Ver|Enh|2003-08-24|how to access ssl session ID out of tomcat to prev|
|28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|29160|Ver|Enh|2004-05-23|precompile problem: _jspx_meth_* (javax.servlet.js|
|29494|Inf|Enh|2004-06-10|No way to set PATH when running as a service on Wi|
|30028|Opn|Nor|2004-07-10|session attributes Map may become inconsistent sta|
|30241|Ver|Enh|2004-07-21|Enhance build script to use branch argument when c|
|32017|Inf|Nor|2004-11-02|Tomcat 5.5 manager fails to undeploy Struts app   |
|33262|Inf|Enh|2005-01-27|Service Manager autostart should check for adminis|
|33453|Opn|Enh|2005-02-08|Jasper should recompile JSP files whose datestamps|
|33650|Inf|Enh|2005-02-19|Jasper performance for multiple files processing  |
|33671|Opn|Enh|2005-02-21|Manual Windows service installation with custom na|
|34801|New|Enh|2005-05-08|PATCH: CGIServlet does not terminate child after a|
|34805|Ass|Enh|2005-05-08|warn about invalid security constraint url pattern|
|34868|Ass|Enh|2005-05-11|allow to register a trust store for a session that|
|35054|Inf|Enh|2005-05-25|warn if appBase is not existing as a File or direc|
|35079|Inf|Enh|2005-05-26|Should be able to specify DNS lookup timeout  |
|35229|Opn|Enh|2005-06-05|alert user about expired certificates in client ce|
|35552|Inf|Enh|2005-06-29|JMS destination under|
|35746|Inf|Enh|2005-07-14|session manager should be immune to system clock t|
|35765|New|Enh|2005-07-16|make the SSL cipher config in server.xml fail safe|
|35869|Inf|Enh|2005-07-26|Can't run as a service on Windows Server 2003 64-B|
|36121|Opn|Maj|2005-08-10|Including JSP's changes working directory |
|36133|Inf|Enh|2005-08-10|Support JSS SSL implementation|
|36169|New|Enh|2005-08-12|[PATCH] Enable chunked encoding for IIS JK connect|
|36362|New|Enh|2005-08-25|missing check for Java reserved keywords in tag fi|
|36540|Inf|Enh|2005-09-07|pooled cluster replication does not seem ensure sy|
|36569|Inf|Enh|2005-09-09|Redirects produce illegal URL's   |
|36630|Opn|Maj|2005-09-13|Error instantiating servlet class |
|36837|Inf|Enh|2005-09-28|Looking for ProxyHandler implementation of Http re|
|36922|Inf|Enh|2005-10-04|setup.sh file mis-advertised and missing  |
|36923|New|Nor|2005-10-05|Deactivated EL expressions are not parsed for jsp |
|37018|Ass|Enh|2005-10-11|Document how to use tomcat-SSL with a pkcs11 token|
|37072|New|Nor|2005-10-13|Encoding mismatch in error condition  |
|37084|Opn|   |2005-10-14|JspC from ant fails on JSPs that use custom taglib|
|37138|New|Enh|2005-10-18|Allow to specify a security provider (priority lis|
|37326|Ass|Nor|2005-11-01|No error reported when  has non-exist|
|37334|Inf|Enh|2005-11-02|Realm digest property not aligned with the adminis|
|37449|Opn|Enh|2005-11-10|Two UserDatabaseRealm break manager user  |
|37485|Inf|Enh|2005-11-14|I'd like to run init SQL after JDBC Connection cre|
|37498|Inf|Nor|2005-11-14|[PATCH] NPE in org.apache.catalina.core.ContainerB|
|37515|Inf|Nor|2005-11-15|smap not generated by JspC when used from Ant for |
|37627|Opn|Nor|2005-11-24|Slow and incomplete dynamic content generation aft|
|37674|New|Nor|2005-11-29|Windows EXE fails to pass spaces in JVMTI -javaage|
|37785|Inf|Nor|2005-12-05|Changing startup type via Tomcat Monitor does not |
|37794|Opn|Nor|2005-12-05|getParameter() fails on POST with transfer-encodin|
|37797|Inf|Maj|2005-12-05|Configure Tomcat utility truncates classpath to 96|
|37822|Opn|Nor|2005-12-07|WebappClassLoader interfering with Catalina core c|
|37834|Ass|Nor|2005-12-08|compressableMimeTypes not working properly|
|37847|Ass|Enh|2005-12-09|Allow User To Optionally Specify Catalina Output F|
|37869|Opn|Nor|2005-12-12|Cannot obtain client certificate with SSL / client|
|37918|Ass|Nor|2005-12-15|EL cannot find valid getter from object when using|
|37956|Opn|Enh|2005-12-18|Mak

Bug report for Watchdog [2007/02/25]

2007-02-25 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld "urn" should be "uri" BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
|24649|New|Nor|2003-11-12|getRemoteHost fails when agent has uppercase chara|
|29398|New|Nor|2004-06-04|Update site and note current status   |
+-+---+---+--+--+
| Total   15 bugs   |
+---+

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug report for Tomcat 4 [2007/02/25]

2007-02-25 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 3839|Opn|Enh|2001-09-26|Problem bookmarking login page|
| 4227|Opn|Enh|2001-10-17|Invalid CGI path  |
| 5329|New|Enh|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in  without className in server.xml produces N|
|11069|Opn|Enh|2002-07-23|Tomcat not flag error if tld is outside of /WEB-IN|
|11129|New|Enh|2002-07-24|New valve for putting the sessionIDs in the reques|
|11248|New|Enh|2002-07-29|DefaultServlet doesn't send expires header|
|11754|Opn|Enh|2002-08-15|Synchronous shutdown script - shutdown.sh should w|
|12069|New|Enh|2002-08-27|Creation of more HttpSession objects for one previ|
|12658|New|Enh|2002-09-15|a proxy host and port at the  element level |
|12766|New|Enh|2002-09-18|Tomcat should use tld files in /WEB-INF/ over vers|
|13309|Opn|Enh|2002-10-04|Catalina calls System.exit()  |
|13634|New|Enh|2002-10-15|Allowing system properties to be substituted in co|
|13689|Opn|Enh|2002-10-16|Classloader paths for 'Common' classes and librari|
|13731|New|Enh|2002-10-17|Final request, response, session and other variabl|
|13941|New|Enh|2002-10-24|reload is VERY slow   |
|13965|New|Enh|2002-10-25|Catalina.sh correction request for Tru64 Unix |
|14097|New|Enh|2002-10-30|hardcoded registry value for vm lets tomcat servic|
|14416|New|Enh|2002-11-10|blank tag name in TLD cause NullPointerException  |
|14635|New|Enh|2002-11-18|Should be possible not to have -MM-DD in log f|
|14766|New|Enh|2002-11-22|Redirect Vavle|
|14993|New|Enh|2002-12-02|Possible obselete synchronized declaration|
|15115|New|Enh|2002-12-05|correct docs... XML parser *cannot* be overridden |
|15417|Opn|Enh|2002-12-16|Add port for forced compilation of JSP pages  |
|15688|New|Enh|2002-12-27|full-qualified names instead of imports   |
|15941|New|Enh|2003-01-10|Expose rootCause exceptions at deeper levels  |
|16294|New|Enh|2003-01-21|Configurable URL Decoding.|
|16357|New|Enh|2003-01-23|"connection timeout reached"  |
|16531|New|Enh|2003-01-29|Updating already deployed ".war" files in a single|
|16579|New|Enh|2003-01-30|documentation page layout/style breaks wrapping to|
|16596|New|Enh|2003-01-30|option for disabling log rotation |
|17070|New|Enh|2003-02-14|The Catalina Ant tasks do not allow for 'reusable'|
|17146|New|Enh|2003-02-18|Simplify build.xml using 

Bug report for Tomcat 3 [2007/02/25]

2007-02-25 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 5331|Ass|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 6027|Inf|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 7785|Inf|Blk|2002-04-06|tomcat bug in context reloading   |
| 7863|Inf|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8187|Inf|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 9737|Ver|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|10047|Ass|Cri|2002-06-20|IllegalStateException |
|10406|Ass|Cri|2002-07-02|IllegalStateException |
|11087|Inf|Blk|2002-07-23|IllegalStateException |
|12156|Inf|Cri|2002-08-29|Apache and Tomcat 3.3.1 Interworking problem  |
|16363|Ass|Cri|2003-01-23|Stack Overflow accessing compiled JSP - Tomcat 3.2|
|39250|Inf|Cri|2006-04-07|Tomcat 3.2.1 + JDK 1.4|
+-+---+---+--+--+
| Total   14 bugs   |
+---+

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41686] - Error logging at startup is unusable

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41686





--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 20:52 ---
Can you provide a simple test war that exhibits this problem? Looking at the
source, the relevant stack trace should be logged just before the two messages
you included in your log extract.

I have an idea what might be going on to cause this problem but a test case
would make fixing it easier.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41666] - If-Unmodified-Since failure

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41666


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 20:06 ---
Fixed in svn. This will be included in 5.5.23 onwards.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511716 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/changelog.xml

2007-02-25 Thread markt
Author: markt
Date: Sun Feb 25 20:06:07 2007
New Revision: 511716

URL: http://svn.apache.org/viewvc?view=rev&rev=511716
Log:
Fix bug 41666. Correct handling of boundary conditions for If-Unmodified-Since 
and If-Modified-Since headers. Patch provided by Suzuki Yuichiro.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?view=diff&rev=511716&r1=511715&r2=511716
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
 Sun Feb 25 20:06:07 2007
@@ -1649,7 +1649,7 @@
 // If an If-None-Match header has been specified, if modified 
since
 // is ignored.
 if ((request.getHeader("If-None-Match") == null)
-&& (lastModified <= headerValue + 1000)) {
+&& (lastModified < headerValue + 1000)) {
 // The entity has not been modified since the date
 // specified by the client. This is not an error case.
 response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
@@ -1740,7 +1740,7 @@
 long lastModified = resourceAttributes.getLastModified();
 long headerValue = request.getDateHeader("If-Unmodified-Since");
 if (headerValue != -1) {
-if ( lastModified > (headerValue + 1000)) {
+if ( lastModified >= (headerValue + 1000)) {
 // The entity has not been modified since the date
 // specified by the client. This is not an error case.
 
response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=511716&r1=511715&r2=511716
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Feb 25 20:06:07 2007
@@ -22,6 +22,11 @@
 throws an exception. (markt)
   
   
+41666 Correct handling of boundary conditions for
+If-Unmodified-Since and If-Modified-Since headers. Patch provided by
+Suzuki Yuichiro. (markt)
+  
+  
 41674 Fix error messages when parsing context.xml that
 incorrectly referred to web.xml. (markt)
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41651] - SC_NOT_MODIFIED should not occur on secure sessions

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41651


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 19:46 ---
Reading through this report I see one potential Tomcat issue, making use of the
if-none-match header and returning a 304 if the request is over HTTPS. However,
I can't find any relevant specification that states Tomcat must (or even should)
ignore an if-none-match header when the request is over HTTPS. I am therefore
resolving this report as INVALID.

If you are aware of part of a specification I have overlooked, please feel free
to re-open this report and provide a reference to that specification.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41674] - The message "Parse error in default web.xml" is not appropriate.

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41674


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 19:12 ---
Thsi is fixed in svn and will be in 5.5.23.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511708 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/startup/ContextConfig.java catalina/src/share/org/apache/catalina/startup/LocalStrings.properties webapps/doc

2007-02-25 Thread markt
Author: markt
Date: Sun Feb 25 19:12:18 2007
New Revision: 511708

URL: http://svn.apache.org/viewvc?view=rev&rev=511708
Log:
Fix bug 41674. Error messages should refer to context.xml not web.xml. Port of 
same fix in TC6.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?view=diff&rev=511708&r1=511707&r2=511708
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
 Sun Feb 25 19:12:18 2007
@@ -762,8 +762,8 @@
 context.addWatchedResource(file.getAbsolutePath());
 }
 } catch (Exception e) {
-log.error(sm.getString("contextConfig.defaultMissing") 
-  + " " + resourceName + " " + file , e);
+log.error(sm.getString("contextConfig.contextMissing",
+  resourceName + " " + file), e);
 }
 
 if (source == null)
@@ -787,13 +787,15 @@
 log.debug("Successfully processed context [" + 
context.getName() 
 + "] configuration file " + baseDir + " " + 
resourceName);
 } catch (SAXParseException e) {
-log.error(sm.getString("contextConfig.defaultParse"), e);
+log.error(sm.getString("contextConfig.contextParse",
+context.getName()), e);
 log.error(sm.getString("contextConfig.defaultPosition",
  "" + e.getLineNumber(),
  "" + e.getColumnNumber()));
 ok = false;
 } catch (Exception e) {
-log.error(sm.getString("contextConfig.defaultParse"), e);
+log.error(sm.getString("contextConfig.contextParse",
+context.getName()), e);
 ok = false;
 } finally {
 contextDigester.reset();
@@ -803,7 +805,7 @@
 stream.close();
 }
 } catch (IOException e) {
-log.error(sm.getString("contextConfig.defaultClose"), e);
+log.error(sm.getString("contextConfig.contextClose"), e);
 }
 }
 }

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties?view=diff&rev=511708&r1=511707&r2=511708
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
 Sun Feb 25 19:12:18 2007
@@ -11,6 +11,9 @@
 contextConfig.cce=Lifecycle event data object {0} is not a Context
 contextConfig.certificatesConfig.added=Added certificates -> request attribute 
Valve
 contextConfig.certificatesConfig.error=Exception adding CertificatesValve:
+contextConfig.contextClose=Error closing context.xml
+contextConfig.contextMissing=Missing context.xml: {0}
+contextConfig.contextParse=Parse error in context.xml for {0}
 contextConfig.defaultClose=Error closing default web.xml
 contextConfig.defaultConfig=Configuration error in default web.xml
 contextConfig.defaultMissing=Missing default web.xml, using application 
web.xml only

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=511708&r1=511707&r2=511708
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Feb 25 19:12:18 2007
@@ -21,6 +21,10 @@
 41608 Make log levels consistent when Servlet.service()
 throws an exception. (markt)
   
+  
+41674 Fix error messages when parsing context.xml that
+incorrectly referred to web.xml. (markt)
+  
 
   
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r511227 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2

2007-02-25 Thread Tim Whittington
Never mind the second issue - one should read the docs more carefully. 
Apologies for the noise.
The missing sizeof makes me nervous still.
 
tim

>>> On 26/02/2007 at 2:33 p.m., in message <[EMAIL PROTECTED]>, "Tim 
>>> Whittington" <[EMAIL PROTECTED]> wrote:
Mladen

Why was this changed to use malloc over _alloca here?

Regardless of that, it looks like there are two (potential) bugs introduced in 
this patch:
- There's no sizeof(char) in the mallo for status_str and headers_str
- status_str isn't initialised, so the check to free it will probably fire all 
the time and do nasty things if it's not allocated (we don't check malloc 
returns anyway, so it'll probably die before then when we write into the 
buffer).

Do you want me to BZ this?

tim

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=511227&r1=511226&r2=511227
 
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Feb 23 22:50:05 
2007
@@ -528,13 +528,14 @@
 return JK_FALSE;
 }

-if (s && s->ws_private) {
+if (s && s->ws_private) {
+int rv = JK_TRUE;
 isapi_private_data_t *p = s->ws_private;
 if (!p->request_started) {
-size_t len_of_status;
+HSE_SEND_HEADER_EX_INFO hi;
 char *status_str;
-char *headers_str;
-
+char *headers_str = NULL;
+BOOL keep_alive = FALSE;
 p->request_started = JK_TRUE;

 /*
@@ -543,9 +544,10 @@
 if (!reason) {
 reason = status_reason(status);
 }
-status_str = (char *)_alloca((6 + strlen(reason)) * sizeof(char));
+status_str = (char *)malloc((6 + strlen(reason)));
 sprintf(status_str, "%d %s", status, reason);
-len_of_status = strlen(status_str);
+hi.pszStatus = status_str;
+hi.cchStatus = strlen(status_str);

 /*
  * Create response headers string
@@ -555,11 +557,11 @@
 for (i = 0, len_of_headers = 0; i < num_of_headers; i++) {
 len_of_headers += strlen(header_names[i]);
 len_of_headers += strlen(header_values[i]);
-len_of_headers += 4;/* extra for colon, space and 
crlf */
+len_of_headers += 4;   /* extra for colon, space and crlf 
*/
 }

-len_of_headers += 3;/* crlf and terminating null char */
-headers_str = (char *)_alloca(len_of_headers * sizeof(char));
+len_of_headers += 3;   /* crlf and terminating null char */
+headers_str = (char *)malloc(len_of_headers);
 headers_str[0] = '\0';

 for (i = 0; i < num_of_headers; i++) {
@@ -569,25 +571,29 @@
 strcat(headers_str, crlf);
 }
 strcat(headers_str, crlf);
+hi.pszHeader = headers_str;
+hi.cchHeader = strlen(headers_str);
 }
 else {
-headers_str = crlf;
+hi.pszHeader = crlf;
+hi.cchHeader = 2;
 }
-
+hi.fKeepConn = keep_alive;
 if (!p->lpEcb->ServerSupportFunction(p->lpEcb->ConnID,
- HSE_REQ_SEND_RESPONSE_HEADER,
- status_str,
- (LPDWORD) &len_of_status,
- (LPDWORD) headers_str)) {
+ 
HSE_REQ_SEND_RESPONSE_HEADER_EX,
+ &hi,
+ NULL, NULL)) {
 jk_log(logger, JK_LOG_ERROR,
-   "HSE_REQ_SEND_RESPONSE_HEADER failed");
-JK_TRACE_EXIT(logger);
-return JK_FALSE;
+   "HSE_REQ_SEND_RESPONSE_HEADER_EX failed");
+rv = JK_FALSE;
 }
+if (headers_str)
+free(headers_str);
+if (status_str)
+free(status_str);
 }
 JK_TRACE_EXIT(logger);
-return JK_TRUE;
-
+return rv;
 }

 JK_LOG_NULL_PARAMS(logger);

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=511227&r1=511226&r2=511227
 
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connecto

svn commit: r511689 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java

2007-02-25 Thread markt
Author: markt
Date: Sun Feb 25 17:57:28 2007
New Revision: 511689

URL: http://svn.apache.org/viewvc?view=rev&rev=511689
Log:
Tabs -> 8 spaces. No other changes.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java?view=diff&rev=511689&r1=511688&r2=511689
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/MimeHeaders.java 
Sun Feb 25 17:57:28 2007
@@ -101,7 +101,7 @@
  * The header fields.
  */
 private MimeHeaderField[] headers = new
-   MimeHeaderField[DEFAULT_HEADER_SIZE];
+MimeHeaderField[DEFAULT_HEADER_SIZE];
 
 /**
  * The current number of header fields.
@@ -126,10 +126,10 @@
  * Clears all header fields.
  */
 public void clear() {
-   for (int i = 0; i < count; i++) {
-   headers[i].recycle();
-   }
-   count = 0;
+for (int i = 0; i < count; i++) {
+headers[i].recycle();
+}
+count = 0;
 }
 
 /**
@@ -153,7 +153,7 @@
  * Returns the current number of header fields.
  */
 public int size() {
-   return count;
+return count;
 }
 
 /**
@@ -161,7 +161,7 @@
  * This may be used to iterate through all header fields.
  */
 public MessageBytes getName(int n) {
-   return n >= 0 && n < count ? headers[n].getName() : null;
+return n >= 0 && n < count ? headers[n].getName() : null;
 }
 
 /**
@@ -169,21 +169,21 @@
  * This may be used to iterate through all header fields.
  */
 public MessageBytes getValue(int n) {
-   return n >= 0 && n < count ? headers[n].getValue() : null;
+return n >= 0 && n < count ? headers[n].getValue() : null;
 }
 
 /** Find the index of a header with the given name.
  */
 public int findHeader( String name, int starting ) {
-   // We can use a hash - but it's not clear how much
-   // benefit you can get - there is an  overhead 
-   // and the number of headers is small (4-5 ?)
-   // Another problem is that we'll pay the overhead
-   // of constructing the hashtable
+// We can use a hash - but it's not clear how much
+// benefit you can get - there is an  overhead 
+// and the number of headers is small (4-5 ?)
+// Another problem is that we'll pay the overhead
+// of constructing the hashtable
 
-   // A custom search tree may be better
+// A custom search tree may be better
 for (int i = starting; i < count; i++) {
-   if (headers[i].getName().equalsIgnoreCase(name)) {
+if (headers[i].getName().equalsIgnoreCase(name)) {
 return i;
 }
 }
@@ -198,11 +198,11 @@
  * that multiple fields with that name exist in this header.
  */
 public Enumeration names() {
-   return new NamesEnumerator(this);
+return new NamesEnumerator(this);
 }
 
 public Enumeration values(String name) {
-   return new ValuesEnumerator(this, name);
+return new ValuesEnumerator(this, name);
 }
 
 //  Adding headers 
@@ -213,54 +213,54 @@
  * field has not had its name or value initialized.
  */
 private MimeHeaderField createHeader() {
-   MimeHeaderField mh;
-   int len = headers.length;
-   if (count >= len) {
-   // expand header list array
-   MimeHeaderField tmp[] = new MimeHeaderField[count * 2];
-   System.arraycopy(headers, 0, tmp, 0, len);
-   headers = tmp;
-   }
-   if ((mh = headers[count]) == null) {
-   headers[count] = mh = new MimeHeaderField();
-   }
-   count++;
-   return mh;
+MimeHeaderField mh;
+int len = headers.length;
+if (count >= len) {
+// expand header list array
+MimeHeaderField tmp[] = new MimeHeaderField[count * 2];
+System.arraycopy(headers, 0, tmp, 0, len);
+headers = tmp;
+}
+if ((mh = headers[count]) == null) {
+headers[count] = mh = new MimeHeaderField();
+}
+count++;
+return mh;
 }
 
 /** Create a new named header , return the MessageBytes
-   container for the new value
+container for the new value
 */
 public MessageBytes addValue( String name ) {
-   MimeHeaderField mh = createHeader();
-   mh.getName().setString(name);
-   return mh.getValue();
+MimeHeaderField mh = createHeader();
+mh.getName().setString(name);
+return mh.getValue();
 }
 

Re: svn commit: r511227 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2

2007-02-25 Thread Tim Whittington
Mladen

Why was this changed to use malloc over _alloca here?

Regardless of that, it looks like there are two (potential) bugs introduced in 
this patch:
 - There's no sizeof(char) in the mallo for status_str and headers_str
 - status_str isn't initialised, so the check to free it will probably fire all 
the time and do nasty things if it's not allocated (we don't check malloc 
returns anyway, so it'll probably die before then when we write into the 
buffer).

Do you want me to BZ this?

tim

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=511227&r1=511226&r2=511227
 
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Feb 23 22:50:05 
2007
@@ -528,13 +528,14 @@
 return JK_FALSE;
 }

-if (s && s->ws_private) {
+if (s && s->ws_private) {
+int rv = JK_TRUE;
 isapi_private_data_t *p = s->ws_private;
 if (!p->request_started) {
-size_t len_of_status;
+HSE_SEND_HEADER_EX_INFO hi;
 char *status_str;
-char *headers_str;
-
+char *headers_str = NULL;
+BOOL keep_alive = FALSE;
 p->request_started = JK_TRUE;

 /*
@@ -543,9 +544,10 @@
 if (!reason) {
 reason = status_reason(status);
 }
-status_str = (char *)_alloca((6 + strlen(reason)) * sizeof(char));
+status_str = (char *)malloc((6 + strlen(reason)));
 sprintf(status_str, "%d %s", status, reason);
-len_of_status = strlen(status_str);
+hi.pszStatus = status_str;
+hi.cchStatus = strlen(status_str);

 /*
  * Create response headers string
@@ -555,11 +557,11 @@
 for (i = 0, len_of_headers = 0; i < num_of_headers; i++) {
 len_of_headers += strlen(header_names[i]);
 len_of_headers += strlen(header_values[i]);
-len_of_headers += 4;/* extra for colon, space and 
crlf */
+len_of_headers += 4;   /* extra for colon, space and crlf 
*/
 }

-len_of_headers += 3;/* crlf and terminating null char */
-headers_str = (char *)_alloca(len_of_headers * sizeof(char));
+len_of_headers += 3;   /* crlf and terminating null char */
+headers_str = (char *)malloc(len_of_headers);
 headers_str[0] = '\0';

 for (i = 0; i < num_of_headers; i++) {
@@ -569,25 +571,29 @@
 strcat(headers_str, crlf);
 }
 strcat(headers_str, crlf);
+hi.pszHeader = headers_str;
+hi.cchHeader = strlen(headers_str);
 }
 else {
-headers_str = crlf;
+hi.pszHeader = crlf;
+hi.cchHeader = 2;
 }
-
+hi.fKeepConn = keep_alive;
 if (!p->lpEcb->ServerSupportFunction(p->lpEcb->ConnID,
- HSE_REQ_SEND_RESPONSE_HEADER,
- status_str,
- (LPDWORD) &len_of_status,
- (LPDWORD) headers_str)) {
+ 
HSE_REQ_SEND_RESPONSE_HEADER_EX,
+ &hi,
+ NULL, NULL)) {
 jk_log(logger, JK_LOG_ERROR,
-   "HSE_REQ_SEND_RESPONSE_HEADER failed");
-JK_TRACE_EXIT(logger);
-return JK_FALSE;
+   "HSE_REQ_SEND_RESPONSE_HEADER_EX failed");
+rv = JK_FALSE;
 }
+if (headers_str)
+free(headers_str);
+if (status_str)
+free(status_str);
 }
 JK_TRACE_EXIT(logger);
-return JK_TRUE;
-
+return rv;
 }

 JK_LOG_NULL_PARAMS(logger);

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=511227&r1=511226&r2=511227
 
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Feb 23 
22:50:05 2007
@@ -27,6 +27,11 @@
   
 
   
+41439: Allow session IDs to get stripped off URLs of static
+content in Apache by adding JkStripSession
+directive (configura

svn commit: r511657 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/config/http.xml

2007-02-25 Thread fhanik
Author: fhanik
Date: Sun Feb 25 15:27:00 2007
New Revision: 511657

URL: http://svn.apache.org/viewvc?view=rev&rev=511657
Log:
More documentation, added acceptorThreadCount as a selection

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=511657&r1=511656&r2=511657
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sun 
Feb 25 15:27:00 2007
@@ -379,7 +379,7 @@
 /**
  * Acceptor thread count.
  */
-protected int acceptorThreadCount = 0;
+protected int acceptorThreadCount = 1;
 public void setAcceptorThreadCount(int acceptorThreadCount) { 
this.acceptorThreadCount = acceptorThreadCount; }
 public int getAcceptorThreadCount() { return acceptorThreadCount; }
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml?view=diff&rev=511657&r1=511656&r2=511657
==
--- tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml Sun Feb 25 15:27:00 2007
@@ -395,6 +395,25 @@
 the -Djava.net.preferIPv4Stack=true value to your command line
 
 
+  
+The number of threads to be used to accept connections. Increase 
this value on a multi CPU machine,
+although you would never really need more than 2. Also, with a lot of 
non keep alive connections,
+you might want to increase this value as well. Default value is 1.
+  
+  
+The number of threads to be used to run for the polling events. 
Default value is 1.
+   Can't see a reason to go above that. But experiment and find your 
own results.
+  
+  
+The time in milliseconds to timeout on a select() for the poller.
+   This value is important, since connection clean up is done on the 
same thread, so dont set this 
+   value to an extremely high one.
+  
+  
+Whether to allow comet servlets or not, Default value is true.
+  
+  
+  
   
 Boolean value, whether to use direct ByteBuffers or java mapped 
ByteBuffers. Default is true
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Processing result of mod_jk for Apache2.0.x is unexpected, differs from the one for Apache1.3.x.

2007-02-25 Thread Rainer Jung
Please open an item in bugzilla (issues.apache.org).

Thanks,

Rainer

Taka J.S. schrieb:
> Hi,
> I'm using Apache2.0.59, mod_jk1.2.20 and Tomcat5.0.28.
> The resources are located in the area where is protected by Tomcat's
> BASIC authentication.
> When I send a request via HEAD method without account nor password,
> the values of response headers are not recorded into the Apache2's
> access log file.
> In the following case of log related parameters for Apache2:
> 
> LogFormat "\"%{WWW-Authenticate}o\"" combined
> CustomLog /var/log/httpd/access_log combined
> 
> Despite the response includes a WWW-Authenticate header that are not
> empty values,
> the log is set as "-" value.
> 
> This phenomenon does not happen at the case of neither Apache1.3.37
> nor the combination of Apache2.2.4 and mod_proxy_ajp.
> 
> I guess that the return value from jk_handler's function causes this
> unexpected result.
> Since the generation of Apache2,
> the value of 'sent_bodyct' has not been set as '1' when the
> 'header_only' value is '1'
> (see httpd-2.0.59/modules/http/http_protocol.c L1765).
> As a result, the condition at
> tomcat-connectors-1.2.20-src/native/apache-2.0/mod_jk.c L2118
>   /* If tomcat returned no body and the status is not OK,
>  let apache handle the error code */
>   if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST) {
>   jk_log(xconf->log, JK_LOG_INFO, "No body with status=%d"
>  " for worker=%s",
>  r->status, worker_name);
>   JK_TRACE_EXIT(xconf->log);
>   return r->status;
>   -- snip --
>   return OK;  /* NOT r->status, even if it has changed. */
> is always true, and jk_handler returns the "NOT OK" value.
> Finnaly, the contents of headers table for Apache2 are all cleared.
> 
> I suggest to mend the 'if'-condition clause as below:
>   if (!r->header_only && !r->sent_bodyct && r->status >=
> HTTP_BAD_REQUEST) {
> 
> What do you think about this, bug or not?
> I would like to resolve this probelm.
> 
> Regards,
> 
> Taka J.S.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511554 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c

2007-02-25 Thread rjung
Author: rjung
Date: Sun Feb 25 09:16:31 2007
New Revision: 511554

URL: http://svn.apache.org/viewvc?view=rev&rev=511554
Log:
Correct comment type and copy and paste artefact in directive usage.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=511554&r1=511553&r2=511554
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Feb 25 09:16:31 
2007
@@ -1812,10 +1812,10 @@
 
 /*
  * JkStripSession specifies if mod_jk should strip the ;jsessionid
- * from the unmapperd urls
+ * from the unmapped urls
  */
 {"JkStripSession", jk_set_strip_session, NULL, RSRC_CONF, FLAG,
- "Should the base server strip the jsessionid from the url"},
+ "Should the server strip the jsessionid from unmapped URLs"},
 
 /*
  * JkLogFile & JkLogLevel specifies to where should the plugin log

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=511554&r1=511553&r2=511554
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Feb 25 09:16:31 
2007
@@ -1853,10 +1853,10 @@
 
 /*
  * JkStripSession specifies if mod_jk should strip the ;jsessionid
- * from the unmapperd urls
+ * from the unmapped urls
  */
 AP_INIT_FLAG("JkStripSession", jk_set_strip_session, NULL, RSRC_CONF,
- "Should the base server strip the jsessionid from the url"),
+ "Should the server strip the jsessionid from unmapped URLs"),
 
 /*
  * JkLogFile & JkLogLevel specifies to where should the plugin log



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511553 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c

2007-02-25 Thread rjung
Author: rjung
Date: Sun Feb 25 09:05:48 2007
New Revision: 511553

URL: http://svn.apache.org/viewvc?view=rev&rev=511553
Log:
Fix typo in ap_log_error (wrong number of arguments).

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=511553&r1=511552&r2=511553
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Feb 25 09:05:48 
2007
@@ -2544,7 +2544,7 @@
  "No worker file and no worker options in httpd.conf "
  "use JkWorkerFile to set workers");
 }
-ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, 0, NULL, "Error 
in reading worker properties");
+ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, NULL, "Error in 
reading worker properties");
 return !OK;
 
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511550 - in /tomcat/connectors/trunk/jk/xdocs: reference/apache.xml webserver_howto/apache.xml

2007-02-25 Thread rjung
Author: rjung
Date: Sun Feb 25 08:47:34 2007
New Revision: 511550

URL: http://svn.apache.org/viewvc?view=rev&rev=511550
Log:
Add JkStripSession info to Apache HowTo. Also add
version dependency.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diff&rev=511550&r1=511549&r2=511550
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Sun Feb 25 08:47:34 
2007
@@ -228,6 +228,8 @@
 This directive is only allowed inside VirtualHost.
 
 The default is Off.
+
+This directive has been introduced in version 1.2.21.
 
 
 

Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?view=diff&rev=511550&r1=511549&r2=511550
==
--- tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Sun Feb 25 
08:47:34 2007
@@ -753,6 +753,20 @@
   JkMount /*/servlet/ ajp13
 
 
+
+If you encoded all your URLs to contain the session id
+(;jsessionid=...), and you later decide, you want to
+move part of the content to Apache httpd, you can tell
+mod_jk to strip off all session ids from URLs for
+those requests, that do not get forwarded via mod_jk.
+
+
+
+You enable this feature by setting JkStripSession to On.
+It can be enabled individually for virtual servers. The default
+value is Off.
+
+
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r511326 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_map.c common/jk_util.c

2007-02-25 Thread Rainer Jung
Two more questions:

[EMAIL PROTECTED] schrieb:
> Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=511326&r1=511325&r2=511326
> ==
> --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
> +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sat Feb 24 11:02:40 
> 2007
> @@ -1744,9 +1744,9 @@
>  jk_server_conf_t *conf =
>  (jk_server_conf_t *) ap_get_module_config(s->module_config,
>&jk_module);
> -
> + 
>  if (jk_map_read_property(conf->worker_properties, line, 1, conf->log) == 
> JK_FALSE)
> -return ap_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line);
> +return ap_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line, 
> NULL);
>  
>  return NULL;
>  }
> @@ -2543,8 +2543,9 @@
>  ap_log_error(APLOG_MARK, APLOG_EMERG, s,
>   "No worker file and no worker options in httpd.conf 
> "
>   "use JkWorkerFile to set workers");
> -return;
>  }
> +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, 0, NULL, 
> "Error in reading worker properties");
> +return !OK;

This is inside jk_init which is void. I think this is correct w.r.t the
apache 1.3 module structure.


> Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=511326&r1=511325&r2=511326
> ==
> --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
> +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sat Feb 24 11:02:40 
> 2007
> @@ -2664,12 +2664,14 @@
>   0, NULL,
>   "No worker file and no worker options in httpd.conf"
>   "use JkWorkerFile to set workers");
> -return;
>  }
> +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, 0, NULL, 
> "Error in reading worker properties");
> +return !OK;
>  }
>  
>  if (jk_map_resolve_references(init_map, "worker.", 1, 1, conf->log) == 
> JK_FALSE) {
> -jk_error_exit(APLOG_MARK, APLOG_EMERG, s, pconf, "Error in resolving 
> configuration references");
> +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, 0, NULL, 
> "Error in resolving configuration references");
> +return !OK;
>  }
>  
>  /* we add the URI->WORKER MAP since workers using AJP14
> @@ -2701,7 +2704,7 @@
>pconf)) != APR_SUCCESS) {
>  ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
>   "mod_jk: could not create jk_log_lock");
> -return HTTP_INTERNAL_SERVER_ERROR;
> +return !OK;
>  }
>  
>  #if JK_NEED_SET_MUTEX_PERMS
> @@ -2710,7 +2713,7 @@
>  ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
>   "mod_jk: Could not set permissions on "
>   "jk_log_lock; check User and Group directives");
> -return HTTP_INTERNAL_SERVER_ERROR;
> +return !OK;
>  }
>  #endif
>  
> @@ -2728,7 +2731,7 @@
>  jk_server_conf_t *sconf = (jk_server_conf_t 
> *)ap_get_module_config(srv->module_config,
>   
>   &jk_module);
>  if (open_jklog(srv, pconf))
> -return HTTP_INTERNAL_SERVER_ERROR;
> +return !OK;
>  if (sconf) {
>  if (!uri_worker_map_alloc(&(sconf->uw_map),
>sconf->uri_to_context, 
> sconf->log))
> @@ -2776,7 +2779,8 @@
>  }
>  }
>  }
> -init_jk(pconf, conf, s);
> +if (init_jk(pconf, conf, s))
> +return !OK;
>  }
>  }

Apache 2.0/2.2 says, you can either return OK or DECLINED, everything
else is an error. So returning !OK means depending on an implementation
detail of apache return constants (!OK could be equal to DECLINED). I
csn see, that the construct !OK is also used in apache code itself, but
only in three modules.

I would prefer to return another code, that's known to be different form
OK and DECLINED. If you insist on súsing !OK, there's still one "return
HTTP_INTERNAL_SERVER_ERROR;" left in line 2766.

Regards,

Rainer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r511326 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_map.c common/jk_util.c

2007-02-25 Thread Rainer Jung
Concerning the new validity check for attributes:

I didn't really test, but from the code it looks like we immediately
return from reading the properties as soon, as we detect an invalid
attribute. I don't know how the IIS and Netscape plugin behave when
reading the properties fails in the middle with JK_FALSE.

Also: we use the same property parsing for other property maps (URL
mappings and rewrite rules). Since URL mapping are only allowed to start
with "/", there can be no clash with "worker.", but how about rewrite
rules for IIS: do they also start with "/"?

Regards,

Rainer


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r511326 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_map.c common/jk_util.c

2007-02-25 Thread Rainer Jung
OK, I understood in the meantime, sorry for the noise.

Rainer Jung schrieb:
> Hi Jean-Frederic,
> 
> what's the plan with:
> 
>> Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=511326&r1=511325&r2=511326
>> ==
>> --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
>> +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sat Feb 24 11:02:40 
>> 2007
>> @@ -96,7 +96,9 @@
>>  
>>  #define DEFAULT_WORKER  JK_AJP13_WORKER_NAME
>>  #define WORKER_LIST_PROPERTY_NAME ("worker.list")
>> +#define LIST_PROPERTY_NAME("list")
>>  #define WORKER_MAINTAIN_PROPERTY_NAME ("worker.maintain")
>> +#define MAINTAIN_PROPERTY_NAME("maintain")
>>  #define DEFAULT_MAINTAIN_TIME   (60)
>>  #define DEFAULT_LB_FACTOR   (1)
>>  #define DEFAULT_DISTANCE(0)
>> @@ -209,6 +211,70 @@
>>  NULL
>>  };
> 
> I can't see those (list, maintain) used anywhere.
> 
> Regards,
> 
> Rainer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r511326 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_map.c common/jk_util.c

2007-02-25 Thread Rainer Jung
Hi Jean-Frederic,

what's the plan with:

> Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=511326&r1=511325&r2=511326
> ==
> --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
> +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sat Feb 24 11:02:40 
> 2007
> @@ -96,7 +96,9 @@
>  
>  #define DEFAULT_WORKER  JK_AJP13_WORKER_NAME
>  #define WORKER_LIST_PROPERTY_NAME ("worker.list")
> +#define LIST_PROPERTY_NAME("list")
>  #define WORKER_MAINTAIN_PROPERTY_NAME ("worker.maintain")
> +#define MAINTAIN_PROPERTY_NAME("maintain")
>  #define DEFAULT_MAINTAIN_TIME   (60)
>  #define DEFAULT_LB_FACTOR   (1)
>  #define DEFAULT_DISTANCE(0)
> @@ -209,6 +211,70 @@
>  NULL
>  };

I can't see those (list, maintain) used anywhere.

Regards,

Rainer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41697] - charset for "application/x-www-form-urlencoded"

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41697


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 07:31 ---
This bug report makes claims which are fundamentally wrong. The default for
parsing a POST body is never file.encoding (!) and ;charset= is of course
supported. If you do not believe me, feel free to look at
Request.parseParameters. Unless you can point out problems in the method, this
report is invalid.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r511527 - /tomcat/connectors/trunk/jk/native/common/jk_util.h

2007-02-25 Thread rjung
Author: rjung
Date: Sun Feb 25 07:25:44 2007
New Revision: 511527

URL: http://svn.apache.org/viewvc?view=rev&rev=511527
Log:
Add function prototype (compiler warning).

Modified:
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?view=diff&rev=511527&r1=511526&r2=511527
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Sun Feb 25 07:25:44 2007
@@ -152,6 +152,8 @@
 
 int jk_is_deprecated_property(const char *prp_name);
 
+int jk_is_valid_property(const char *prp_name);
+
 int jk_get_worker_stdout(jk_map_t *m, const char *wname, const char 
**stdout_name);
 
 int jk_get_worker_stderr(jk_map_t *m, const char *wname, const char 
**stderr_name);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41697] - charset for "application/x-www-form-urlencoded"

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41697


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 05:20 ---
having a charset apparently once was supported: Bug 10674

some browsers appear to expect charset to be supported:
http://www.gossamer-threads.com/lists/modperl/asp/89156

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 10674] - Unable to get POST data from request

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=10674





--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 05:14 ---
see also Bug 41697

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41697] New: - charset for "application/x-www-form-urlencoded"

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41697

   Summary: charset for "application/x-www-form-urlencoded"
   Product: Tomcat 5
   Version: 5.0.20
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Connector:HTTP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


currently, if the browser uses "application/x-www-form-urlencoded" and the
file.encoding system parameter is on "UTF-8"
- the GET method treats it as ISO-8859-1
- the POST method interprets it as UTF-8 while

so, "field=gr%FCsse" will result in either
"grüsse" (or rather the distorted 2 characters for "ü") with GET
while with POST, you'll only get "gr." (%FC becomes a byte with value 252 that
in org.apache.tomcat.util.buf.ByteChunk.toStringInternal(), 
   strValue = new String( buff, start, end-start, enc );
gets truncated).

if I add to the connector tag in the server.xml the attribute
URIEncoding="UTF-8"  now POST and GET behave the same way (both truncating).

Enhancement suggestions:
1) align the config of GET and POST, i.e. drive the default for both by the
file.encoding System parameter or both by URIEncoding
(http://tomcat.apache.org/tomcat-5.5-doc/config/http.html)
2) allow the browser to specify the charset like for many other content types,
e.g. 'application/x-www-form-urlencoded; charset="ISO8859-1"' will also use
ISO-8859-1 even if the file.encoding is different

see also: Bug 34445, http://tomcat.apache.org/faq/connectors.html#utf8 and
bottom of http://wiki.apache.org/tomcat/Tomcat/UTF-8

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41675] - Add a debug statement when some necessary header information is missing

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41675





--- Additional Comments From [EMAIL PROTECTED]  2007-02-25 02:33 ---
Cedric means org.apache.coyote.http11.Http11Processor.prepareRequest() where in
the request the headers "HTTP/1.1" or "Host" are enforced, but only response
code 505 or 400 and 501 are sent, but no (valuable) background is written to any
log at any debug level (Unsupported transfer encoding, "Host" header missing, 
etc.)

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41696] New: - ApplicationDispatcher can't handle alternative HttpRequest-Implementation on forward

2007-02-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41696

   Summary: ApplicationDispatcher can't handle alternative
HttpRequest-Implementation on forward
   Product: Tomcat 5
   Version: 5.0.16
  Platform: All
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Bug or feature?
I was trying to write a servlet-filter which should check on all posted
request-parameters and replace potential cross-site-scripting attacks from the
sent content by harmless equivalents.

First I subclassed HttpServletRequestWrapper and overrode getParameter,
getParameterMap, getParameterValues and getParameterValues but the
applicationdispatcher still used the parametermap from the wrapped request when
forwarding the request. This is not nice since the parameters of the forwarded
url are not added to the filters parametermap. It happens because
appclicationdispatcher internally unwraps all nested requests until an internal
type is reached. Everything works as expected as long as I dont forward the
request! 

Next I tried to implement interface HttpServletRequest on my own (simple
delegatepattern) because ApplicationDispatcher explicitly does NOT unwrap
NON-HttpServletRequestWrapper (ApplicationDispatcher.java line 871). But in this
case a ClassCastException is thrown at line 814 when unwrapping the request. At
this point Non-HttpServletRequestWrapper are not(!) ignored.

So in the end imho it comes down to these questions:
1. HttpServletRequestWrapper delegates calls on every method to it's wrapped
request. So in effect when merging requestparameters of the request with the
parameters of a forward-url, calls on getParameterMap etc are delegated to the
original request anyway as long as these methods are not overridden. I haven't
found a part in the spec where it is explicitly forbidden to alter
request-parameters when using a wrapper.

2. Should ApplicationDispatcher be able to handle any implementation of
HttpServletRequest or does J2EE-Specs allow to rely solely on own implementation
types? I ApplicationDispatcher should handle any implementation this should be
considered as a bug and the unwrap-method should be fixed!

Wolfgang

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]