DO NOT REPLY [Bug 50223] Http Connector does not listen on all IP addresses by default

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50223

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME
 OS/Version||All

--- Comment #1 from Mark Thomas  2010-11-10 07:39:27 EST ---
Works for me with latest Win2k8/Java/Tomcat.

I suspect IPv4 / IPv6 / localhost configuration issues. This is one for the
users list.

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

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



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

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 11:45:36 2010
New Revision: 1033419

URL: http://svn.apache.org/viewvc?rev=1033419&view=rev
Log:
Additional patch to address kkolinko's concerns
Remove rjung's vote since the patch is significantly different

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=1033419&r1=1033418&r2=1033419&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Nov 10 11:45:36 2010
@@ -91,20 +91,10 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49860
   Add support for trailing headers.
   http://svn.apache.org/viewvc?rev=1003461&view=rev
+  http://svn.apache.org/viewvc?rev=1033415&view=rev
   Note: Don't change return type for parseEndChunk(), just return true.
-  +1: markt, rjung
-  -1: kkolinko:
-Regarding implementation of ChunkedInputFilter.parseHeader():
-One cannot remember old value of 'pos' (e.g. 'int start = pos')
-outside of a loop that calls readBytes(). The remembered positions
-are not valid after the readBytes() call.
-markt: This is pretty much an exact copy of
-   InternalInputBuffer.parseHeader() which has been working for years.
-   Could you elaborate on where you see the issue. A test case that
-   demonstrates it would be even better.
-kkolinko: I have replied in Re:r1031024
-  Here is a testcase: 
https://issues.apache.org/bugzilla/attachment.cgi?id=26265&action=edit
-
+  +1: markt
+  -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
   Force DefaultServlet to serve all resources relative to context root



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



svn commit: r1033432 - in /tomcat/trunk/webapps/docs: changelog.xml logging.xml

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 12:20:59 2010
New Revision: 1033432

URL: http://svn.apache.org/viewvc?rev=1033432&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50242
Provide sample log4j config that is a closer match to the default config

Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/logging.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1033432&r1=1033431&r2=1033432&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Nov 10 12:20:59 2010
@@ -189,6 +189,11 @@
 Localize messages in the Host Manager application based on the Locale 
of
 the user rather than the default Locale of the server. (markt)
   
+  
+50242: Provide a sample log4j  configuration that more
+closely matches the default JULI configuration. Patch provided by
+Christopher Schultz. (markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?rev=1033432&r1=1033431&r2=1033432&view=diff
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Wed Nov 10 12:20:59 2010
@@ -235,13 +235,46 @@ java.util.logging.ConsoleHandler.formatt
 Create a file called log4j.properties with the following content 
 and save it into $CATALINA_HOME/lib.
   
-log4j.rootLogger=INFO, R 
-log4j.appender.R=org.apache.log4j.RollingFileAppender 
-log4j.appender.R.File=${catalina.base}/logs/tomcat.log 
-log4j.appender.R.MaxFileSize=10MB 
-log4j.appender.R.MaxBackupIndex=10 
-log4j.appender.R.layout=org.apache.log4j.PatternLayout 
-log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.rootLogger=INFO, CATALINA
+
+# Define all the appenders
+log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.CATALINA.file=${catalina.base}/logs/catalina.
+log4j.appender.CATALINA.encoding=UTF-8
+# Roll-over the log once per day
+log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
+log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.CATALINA.append=true
+
+log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.LOCALHOST.file=${catalina.base}/logs/localhost.
+log4j.appender.LOCALHOST.encoding=UTF-8
+log4j.appender.LOCALHOST.DatePattern='.'-MM-dd'.log'
+log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.LOCALHOST.append=true
+
+log4j.appender.MANAGER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.MANAGER.file=${catalina.base}/logs/manager.
+log4j.appender.MANAGER.encoding=UTF-8
+log4j.appender.MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.MANAGER.append=true
+
+log4j.appender.HOST-MANAGER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.HOST-MANAGER.file=${catalina.base}/logs/host-manager.
+log4j.appender.HOST-MANAGER.encoding=UTF-8
+log4j.appender.HOST-MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.HOST-MANAGER.append=true
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.encoding=UTF-8
+log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
+
+# Configure which loggers log to which appenders
+log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
 LOCALHOST
+log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=INFO,
 MANAGER
+log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=INFO,
 HOST-MANAGER
   
 
 
@@ -251,7 +284,7 @@ log4j.appender.R.layout.ConversionPatter
 Build or download the additional logging components. See the
 extras components documentation for
 details.
-
+
 Replace $CATALINA_HOME/bin/tomcat-juli.jar with
 output/extras/tomcat-juli.jar.
 
@@ -265,11 +298,10 @@ log4j.appender.R.layout.ConversionPatter
 
 
 
-  This log4j configuration sets up a file called tomcat.log in your 
-  Tomcat logs folder with a maximum file size of 10MB and
-  up to 10 backups.  INFO level is specified which will result in a similar
-  level of detail to the standard java.util.logging confgiuration. Use 
DEBUG
-  level logging for the most verbose output from Tomcat.
+  This log4j configuration mirrors the default java.util.logging setup
+  that ships with Tomcat: both the manager and host-manager apps get an
+  individual log file, and everything else goes to the "catalina.log"

DO NOT REPLY [Bug 50242] Sample log4j configuration does not match default JULI-based configuration

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50242

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Mark Thomas  2010-11-10 07:22:50 EST ---
Patch applied. Many thanks. It will be in  7.0.5 onwards.

I made one minor tweak, I left the default log level as INFO so it was
consistent with the instructions further down for using DEBUG level logging.

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

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



svn commit: r1033420 - in /tomcat/trunk/java/org/apache/tomcat/util/http: MimeHeaders.java Parameters.java

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 11:48:46 2010
New Revision: 1033420

URL: http://svn.apache.org/viewvc?rev=1033420&view=rev
Log:
Fix Eclipse warnings

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java
tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java?rev=1033420&r1=1033419&r2=1033420&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java Wed Nov 10 
11:48:46 2010
@@ -111,6 +111,7 @@ public class MimeHeaders {
  * Creates a new MimeHeaders object using a default buffer size.
  */
 public MimeHeaders() {
+// NO-OP
 }
 
 /**
@@ -392,10 +393,12 @@ class NamesEnumerator implements Enumera
 pos++;
 }
 
+@Override
 public boolean hasMoreElements() {
 return next!=null;
 }
 
+@Override
 public String nextElement() {
 String current=next;
 findNext();
@@ -433,10 +436,12 @@ class ValuesEnumerator implements Enumer
 pos++;
 }
 
+@Override
 public boolean hasMoreElements() {
 return next!=null;
 }
 
+@Override
 public String nextElement() {
 MessageBytes current=next;
 findNext();
@@ -458,6 +463,7 @@ class MimeHeaderField {
  * Creates a new, uninitialized header field.
  */
 public MimeHeaderField() {
+// NO-OP
 }
 
 public void recycle() {

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1033420&r1=1033419&r2=1033420&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Wed Nov 10 
11:48:46 2010
@@ -52,10 +52,8 @@ public final class Parameters {
 String encoding=null;
 String queryStringEncoding=null;
 
-/**
- * 
- */
 public Parameters() {
+// NO-OP
 }
 
 public void setQuery( MessageBytes queryMB ) {



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



svn commit: r1033414 - /tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 11:08:31 2010
New Revision: 1033414

URL: http://svn.apache.org/viewvc?rev=1033414&view=rev
Log:
kkolinko's additional test case for 
https://issues.apache.org/bugzilla/show_bug.cgi?id=49860
Test for correct handling if read buffer is filled and then re-used

Modified:

tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java

Modified: 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java?rev=1033414&r1=1033413&r2=1033414&view=diff
==
--- 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java 
(original)
+++ 
tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java 
Wed Nov 10 11:08:31 2010
@@ -46,7 +46,7 @@ public class TestChunkedInputFilter exte
 
 tomcat.start();
 
-String request =
+String[] request = new String[]{
 "POST /echo-params.jsp HTTP/1.1" + SimpleHttpClient.CRLF +
 "Host: any" + SimpleHttpClient.CRLF +
 "Transfer-encoding: chunked" + SimpleHttpClient.CRLF +
@@ -59,16 +59,16 @@ public class TestChunkedInputFilter exte
 "4" + SimpleHttpClient.CRLF +
 "&b=1" + SimpleHttpClient.CRLF +
 "0" + SimpleHttpClient.CRLF +
-"x-trailer: TestTestTest" + SimpleHttpClient.CRLF +
-SimpleHttpClient.CRLF;
+"x-trailer: Test", 
"TestTest0123456789abcdefghijABCDEFGHIJopqrstuvwxyz" + SimpleHttpClient.CRLF +
+SimpleHttpClient.CRLF };
 
 TrailerClient client = new TrailerClient();
 client.setPort(getPort());
-client.setRequest(new String[] {request});
+client.setRequest(request);
 
 client.connect();
 client.processRequest();
-assertEquals("null7TestTestTest", client.getResponseBody());
+
assertEquals("null7TestTestTest0123456789abcdefghijABCDEFGHIJopqrstuvwxyz", 
client.getResponseBody());
 }
 
 public void testNoTrailingHeaders() throws Exception {



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



svn commit: r1033415 - /tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 11:08:44 2010
New Revision: 1033415

URL: http://svn.apache.org/viewvc?rev=1033415&view=rev
Log:
Additional fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49860
Need to store headers in a separate buffer - the contents of the read buffer 
may not be static for the life of the request

Modified:
tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1033415&r1=1033414&r2=1033415&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
Wed Nov 10 11:08:44 2010
@@ -100,6 +100,12 @@ public class ChunkedInputFilter implemen
 
 
 /**
+ * Byte chunk used to store trailing headers.
+ */
+protected ByteChunk trailingHeaders = new ByteChunk();
+
+
+/**
  * Flag set to true if the next call to doRead() must parse a CRLF pair
  * before doing anything else.
  */
@@ -236,6 +242,7 @@ public class ChunkedInputFilter implemen
 pos = 0;
 lastValid = 0;
 endChunk = false;
+trailingHeaders.recycle();
 }
 
 
@@ -377,7 +384,6 @@ public class ChunkedInputFilter implemen
 }
 
 
-@SuppressWarnings("null") // headerValue cannot be null
 private boolean parseHeader() throws IOException {
 
 MimeHeaders headers = request.getMimeHeaders();
@@ -406,7 +412,7 @@ public class ChunkedInputFilter implemen
 }
 
 // Mark the current buffer position
-int start = pos;
+int start = trailingHeaders.getEnd();
 
 //
 // Reading the header name
@@ -424,29 +430,33 @@ public class ChunkedInputFilter implemen
 throw new EOFException("Unexpected end of stream whilst 
reading trailer headers for chunked request");
 }
 
-if (buf[pos] == Constants.COLON) {
-colon = true;
-headerValue = headers.addValue(buf, start, pos - start);
-}
 chr = buf[pos];
 if ((chr >= Constants.A) && (chr <= Constants.Z)) {
 buf[pos] = (byte) (chr - Constants.LC_OFFSET);
 }
+
+if (buf[pos] == Constants.COLON) {
+colon = true;
+} else {
+trailingHeaders.append(buf[pos]);
+}
 
 pos++;
 
 }
+headerValue = headers.addValue(trailingHeaders.getBytes(), start,
+trailingHeaders.getEnd() - start);
 
 // Mark the current buffer position
-start = pos;
-int realPos = pos;
-
+start = trailingHeaders.getEnd();
+
 //
 // Reading the header value (which can be spanned over multiple lines)
 //
 
 boolean eol = false;
 boolean validLine = true;
+int lastSignificantChar = 0;
 
 while (validLine) {
 
@@ -469,8 +479,6 @@ public class ChunkedInputFilter implemen
 
 }
 
-int lastSignificantChar = realPos;
-
 // Reading bytes until the end of the line
 while (!eol) {
 
@@ -485,20 +493,16 @@ public class ChunkedInputFilter implemen
 } else if (buf[pos] == Constants.LF) {
 eol = true;
 } else if (buf[pos] == Constants.SP) {
-buf[realPos] = buf[pos];
-realPos++;
+trailingHeaders.append(buf[pos]);
 } else {
-buf[realPos] = buf[pos];
-realPos++;
-lastSignificantChar = realPos;
+trailingHeaders.append(buf[pos]);
+lastSignificantChar = trailingHeaders.getEnd();
 }
 
 pos++;
 
 }
 
-realPos = lastSignificantChar;
-
 // Checking the first character of the new line. If the character
 // is a LWS, then it's a multiline header
 
@@ -515,14 +519,14 @@ public class ChunkedInputFilter implemen
 eol = false;
 // Copying one extra space in the buffer (since there must
 // be at least one space inserted between the lines)
-buf[realPos] = chr;
-realPos++;
+trailingHeaders.append(chr);
 }
 
 }
 
 // Set the header value
-headerValue.setBytes(buf, start, realPos - start);
+headerValue.setBytes(trailingHeaders.getBytes(), start,
+lastSignificantChar - start);
 
 return true;
 }



---

svn commit: r1033448 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/changelog.xml

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 13:02:55 2010
New Revision: 1033448

URL: http://svn.apache.org/viewvc?rev=1033448&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50222
Pin the system rather than the common class loader in memory which will work 
better in an embedded environment.

Modified:

tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1033448&r1=1033447&r2=1033448&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
Wed Nov 10 13:02:55 2010
@@ -151,162 +151,188 @@ public class JreMemoryLeakPreventionList
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
 if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) {
-/*
- * Several components end up calling:
- * sun.awt.AppContext.getAppContext()
- * 
- * Those libraries / components known to trigger memory leaks due 
to
- * eventual calls to getAppContext() are:
- * - Google Web Toolkit via its use of javax.imageio
- * - Tomcat via its use of java.beans.Introspector.flushCaches() in
- *   1.6.0_15 onwards
- * - others TBD
- */
-
-// Trigger a call to sun.awt.AppContext.getAppContext(). This will
-// pin the common class loader in memory but that shouldn't be an
-// issue.
-if (appContextProtection) {
-ImageIO.getCacheDirectory();
-}
-
-/*
- * Several components end up calling:
- * sun.misc.GC.requestLatency(long)
- * 
- * Those libraries / components known to trigger memory leaks due 
to
- * eventual calls to requestLatency(long) are:
- * - javax.management.remote.rmi.RMIConnectorServer.start()
- */
-if (gcDaemonProtection) {
-try {
-Class clazz = Class.forName("sun.misc.GC");
-Method method = clazz.getDeclaredMethod("requestLatency",
-new Class[] {long.class});
-method.invoke(null, Long.valueOf(360));
-} catch (ClassNotFoundException e) {
-if (System.getProperty("java.vendor").startsWith("Sun")) {
-log.error(sm.getString(
-"jreLeakListener.gcDaemonFail"), e);
-} else {
-log.debug(sm.getString(
-"jreLeakListener.gcDaemonFail"), e);
+
+ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
+
+try
+{
+// Use the system classloader as the victim for all this
+// ClassLoader pinning we're about to do.
+Thread.currentThread().setContextClassLoader(
+ClassLoader.getSystemClassLoader());
+
+/*
+ * Several components end up calling:
+ * sun.awt.AppContext.getAppContext()
+ * 
+ * Those libraries / components known to trigger memory leaks
+ * due to eventual calls to getAppContext() are:
+ * - Google Web Toolkit via its use of javax.imageio
+ * - Tomcat via its use of 
java.beans.Introspector.flushCaches()
+ *   in 1.6.0_15 onwards
+ * - others TBD
+ */
+
+// Trigger a call to sun.awt.AppContext.getAppContext(). This
+// will pin the system class loader in memory but that 
shouldn't
+// be an issue.
+if (appContextProtection) {
+ImageIO.getCacheDirectory();
+}
+
+/*
+ * Several components end up calling:
+ * sun.misc.GC.requestLatency(long)
+ * 
+ * Those libraries / components known to trigger memory leaks
+ * due to eventual calls to requestLatency(long) are:
+ * - javax.management.remote.rmi.RMIConnectorServer.start()
+ */
+if (gcDaemonProtection) {
+try {
+Class clazz = Class.forName("sun.misc.GC");
+Method method = clazz.getDeclaredMet

DO NOT REPLY [Bug 50222] JreMemoryLeakPreventionListener should speculatively cause memory leaks using the system ClassLoader

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50222

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
 OS/Version||All

--- Comment #2 from Mark Thomas  2010-11-10 08:04:11 EST ---
Nice idea and thanks for the patch.

It has been applied to 7.0.x and will be included in 7.0.5 onwards.

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

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



svn commit: r1033423 - /tomcat/trunk/webapps/docs/changelog.xml

2010-11-10 Thread markt
Author: markt
Date: Wed Nov 10 12:05:28 2010
New Revision: 1033423

URL: http://svn.apache.org/viewvc?rev=1033423&view=rev
Log:
Update

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1033423&r1=1033422&r2=1033423&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Nov 10 12:05:28 2010
@@ -123,6 +123,14 @@
   
 
   
+  
+
+  
+49860: Complete support for handling trailing headers in
+chunked HTTP requests. (markt)
+  
+
+  
   
 
   
@@ -606,8 +614,8 @@
 the connectors. (markt)
   
   
-49860: Add support for trailing headers in chunked HTTP
-requests. (markt)
+49860: Add partial support for trailing headers in chunked
+HTTP requests. (markt)
   
 
   



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



svn commit: r1033643 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jk/core/MsgContext.java webapps/docs/changelog.xml

2010-11-10 Thread rjung
Author: rjung
Date: Wed Nov 10 19:01:15 2010
New Revision: 1033643

URL: http://svn.apache.org/viewvc?rev=1033643&view=rev
Log:
BZ 48925: request.getLocalAddr() returns null
when using the default Jk AJP/1.3 connector.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1033643&r1=1033642&r2=1033643&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Nov 10 19:01:15 2010
@@ -144,14 +144,6 @@ PATCHES PROPOSED TO BACKPORT:
when I go from JRE selection page to the next page in TC7 installer.
kkolinko: merging r1027504 does not perform cleanly
 
-* Fix for BZ 48925: request.getLocalAddr() returns "null"
-  It only happens for the old ajp implementation, so no fix for TC 7 needed.
-  Copy local addr from local name just as we do in the ajp processor
-  implementation.
-  http://people.apache.org/~rjung/patches/bz48925-tc6-ajp-localaddr.patch
-  +1: rjung, kkolinko, markt
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50228
   Improve recycling of BodyContentImpl.
   Recycle it as early. Do not wait until it is actually reused.

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java?rev=1033643&r1=1033642&r2=1033643&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java Wed Nov 10 
19:01:15 2010
@@ -377,6 +377,10 @@ public class MsgContext implements Actio
 ByteChunk bc = (ByteChunk)param;
 req.setContentLength(bc.getLength());
 jkIS.setReplay(bc);
+} else if (actionCode == ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE) {
+// Copy from local name for now, which should simply be an address
+Request req=(Request)param;
+req.localAddr().setString(req.localName().toString());
 }
 }
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1033643&r1=1033642&r2=1033643&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Nov 10 19:01:15 2010
@@ -179,6 +179,10 @@
 message. (markt)
   
   
+48925: request.getLocalAddr() returns
+null when using the default Jk AJP/1.3 connector. (rjung)
+  
+  
 49497: Stop accepting new requests (inc keep-alive) once the
 BIO connector is paused and the current request has finished 
processing.
 (markt)



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



DO NOT REPLY [Bug 48925] ((ServletRequest) request).getLocalAddr() returns "null"

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48925

Rainer Jung  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
Version|unspecified |6.0.29
  Component|mod_jk  |Connectors
   Platform|PC  |All
 Resolution||FIXED
   Target Milestone|--- |default
Product|Tomcat Connectors   |Tomcat 6
 OS/Version|Linux   |All

--- Comment #6 from Rainer Jung  2010-11-10 14:05:03 
EST ---
Patch applied in r1033643, will be part of Tomcat 6.0.30.
No fix needed and no workaround available for mod_jk.

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

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



DO NOT REPLY [Bug 50189] AJP connector sends GET BODY CHUNK when reading after response closed

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50189

Clint Morgan  changed:

   What|Removed |Added

 CC||clint.mor...@tasktop.com

--- Comment #3 from Clint Morgan  2010-11-10 14:22:58 
EST ---
I've also hit this issue in tomcat 6.0.26 and 7.0.4. This has been using an
in-house version of the AJP client (webserver-side).

Our symptoms were the same, and we had been working around by disabling
connection sharing across requests.

Following James' advice, I've removed the possibility for a servlet-side read
from the request after the response has been closed. This has resolved the
issue of us.

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

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



Re: Objections about formatting options to time stamp in access log

2010-11-10 Thread Rainer Jung

On 10.11.2010 04:38, sebb wrote:

The private static fields timezone and timeZone[No]DST are not final,
but appear to be shared between threads.
The method that creates them is synchronised, but methods that read
them don't appear to be.
It would be safer to make these fields final and create them in a
static block (or equivalent).


Thanks, done. Updated patch at:

http://people.apache.org/~rjung/patches/tomcat-trunk-accesslog-extended-timestamp-v2.patch

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



DO NOT REPLY [Bug 50250] New: Split package issue in impl and jstlel bundles

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50250

   Summary: Split package issue in impl and jstlel bundles
   Product: Taglibs
   Version: 1.2.0
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P2
 Component: Standard Taglib
AssignedTo: dev@tomcat.apache.org
ReportedBy: rwo...@gmail.com


hi devs,

I notice the jstlel is extracted from the impl. But the
"resources\org\apache\taglibs\standard\lang\jstl" is still in the impl bundle.

This causes a split package issue in osgi environment. The impl will also
export "org.apache.taglibs.standard.lang.jstl" package which only contains 2
resources.

Just svn mv them to jstlel can resovle this problem.

thanks.

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

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



DO NOT REPLY [Bug 50250] Split package issue in impl and jstlel bundles

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50250

--- Comment #1 from Rex Wang  2010-11-10 21:54:25 EST ---
Hi devs,

Would you please help re-deploy the artifacts after you fix this issue?

-Rex

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

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



DO NOT REPLY [Bug 50252] New: ClassCastException occurs if context.xml contains .

2010-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50252

   Summary: ClassCastException occurs if context.xml contains
.
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: mashm...@gmail.com


Created an attachment (id=26281)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26281)
patch for NamingContext.java

If context.xml contains , ClassCastException occurs as follows.

java.lang.ClassCastException: org.apache.naming.ResourceLinkRef cannot be cast
to org.apache.naming.ResourceRef
at org.apache.naming.NamingContext.lookup(NamingContext.java:828)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at
org.apache.catalina.core.DefaultInstanceManager.lookupFieldResource(DefaultInstanceManager.java:460)
at
org.apache.catalina.core.DefaultInstanceManager.processAnnotations(DefaultInstanceManager.java:299)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1046)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:797)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:237)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

This issue is relating to the following issue.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50159

I attached the patch for this issue.
Regards.

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

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



Re: Objections about formatting options to time stamp in access log

2010-11-10 Thread Konstantin Kolinko
2010/11/11 Rainer Jung :
> On 10.11.2010 04:38, sebb wrote:
>>
>> The private static fields timezone and timeZone[No]DST are not final,
>> but appear to be shared between threads.
>> The method that creates them is synchronised, but methods that read
>> them don't appear to be.
>> It would be safer to make these fields final and create them in a
>> static block (or equivalent).
>
> Thanks, done. Updated patch at:
>
> http://people.apache.org/~rjung/patches/tomcat-trunk-accesslog-extended-timestamp-v2.patch
>

Looks interesting.

> buf.append(Long.toString(...))

won't produce leading zeros

> The addElement() in the interface isn't very helpful.

If there is a need to change the AccessLogElement interface, I think
that can be done. We already changed it between TC6 and TC7
(StringBuffer -> StringBuilder).


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: r1033830 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-11-10 Thread kkolinko
Author: kkolinko
Date: Thu Nov 11 07:44:10 2010
New Revision: 1033830

URL: http://svn.apache.org/viewvc?rev=1033830&view=rev
Log:
propose a backport

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=1033830&r1=1033829&r2=1033830&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Nov 11 07:44:10 2010
@@ -150,3 +150,12 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1032232&view=rev
   +1: kkolinko, markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50222
+  Pin the system rather than the common class loader in memory which will
+  work better in an embedded environment.
+  Patch provided by Christopher Schultz.
+  http://svn.apache.org/viewvc?rev=1033448&view=rev
+  +1: kkolinko
+  -1:
+



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