Re: [VOTE] Release Apache Tomcat 7.0.40
On 05/05/2013 11:44, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.40 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.40/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-001/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_40/ > > The proposed 7.0.40 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 7.0.40 Stable Unit tests pass on 64-bit Windows and 64-bit Linux EL TCK passes JSP TCK passes with HTTP (direct) BIO, NIO & APR/native (1.1.27) Servlet TCK passes with - HTTP (direct) BIO, NIO & APR/native (1.1.27) - HTTP (mod_proxy_http) BIO, NIO & APR/native (1.1.27) - AJP (mod_jk) BIO, NIO & APR/native (1.1.27) - AJP (mod_proxy_ajp) BIO, NIO & APR/native (1.1.27) All TCK tests run on 64-bit Linux with a security manager Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[RESULT][VOTE] Release Apache Tomcat 7.0.40
+1 (binding) : rjung, mturk, yoavs, olamy, kfujino, jfarcand, markt +1 (non-binding) : Brian Burch, violetagg, Ognjen Blagojevic, schultz No other votes were cast. This vote therefore passes. I'll publish the files shortly and announce once the mirrors have caught up. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1946 - /dev/tomcat/tomcat-7/v7.0.40/ /release/tomcat/tomcat-7/v7.0.40/
Author: markt Date: Thu May 9 07:41:15 2013 New Revision: 1946 Log: Release 7.0.40 Added: release/tomcat/tomcat-7/v7.0.40/ - copied from r1945, dev/tomcat/tomcat-7/v7.0.40/ Removed: dev/tomcat/tomcat-7/v7.0.40/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1946 - /dev/tomcat/tomcat-7/v7.0.40/ /release/tomcat/tomcat-7/v7.0.40/
Author: markt Date: Thu May 9 07:41:15 2013 New Revision: 1946 Log: Release 7.0.40 Added: release/tomcat/tomcat-7/v7.0.40/ - copied from r1945, dev/tomcat/tomcat-7/v7.0.40/ Removed: dev/tomcat/tomcat-7/v7.0.40/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1947 - /release/tomcat/tomcat-6/v6.0.36/
Author: markt Date: Thu May 9 07:51:50 2013 New Revision: 1947 Log: Remove 6.0.36 from the mirrors Removed: release/tomcat/tomcat-6/v6.0.36/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1947 - /release/tomcat/tomcat-6/v6.0.36/
Author: markt Date: Thu May 9 07:51:50 2013 New Revision: 1947 Log: Remove 6.0.36 from the mirrors Removed: release/tomcat/tomcat-6/v6.0.36/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54944] New: Enhancements to TestFormAuthenticator
https://issues.apache.org/bugzilla/show_bug.cgi?id=54944 Bug ID: 54944 Summary: Enhancements to TestFormAuthenticator Product: Tomcat 8 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: br...@pingtoo.com Classification: Unclassified Created attachment 30266 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30266&action=edit svn diff: update to test class I have attached an extensive patch to this existing test class. The main benefit is better comments and self-documenting arguments to the common worker methods, which should be helpful to anyone investigating tomcat authentication behaviour but who does not have a detailed understanding of its internal logic. The motive and techniques used here bring the source into line with an earlier enhancement to the TestNonLoginAndBasicAuthenticator, i.e. https://issues.apache.org/bugzilla/show_bug.cgi?id=54190#c4 All tests should pass with the latest trunk. Code style should be acceptable. -- 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: r1480742 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Author: markt Date: Thu May 9 19:25:40 2013 New Revision: 1480742 URL: http://svn.apache.org/r1480742 Log: Comment typo Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1480742&r1=1480741&r2=1480742&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu May 9 19:25:40 2013 @@ -345,7 +345,7 @@ public class CoyoteAdapter implements Ad } } -// Check to see if non-blocking writes are reads are being used +// Check to see if non-blocking writes or reads are being used if (!request.isAsyncDispatching() && request.isAsync()) { if (res.getWriteListener() != null && status == SocketStatus.OPEN_WRITE) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1480757 - in /tomcat/trunk/java/org/apache/coyote: ActionCode.java Response.java http11/AbstractOutputBuffer.java http11/Http11NioProcessor.java http11/InternalNioOutputBuffer.java
Author: markt Date: Thu May 9 20:18:50 2013 New Revision: 1480757 URL: http://svn.apache.org/r1480757 Log: Refactoring to remove unnecessary SET_WRITE_LISTENER action Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java tomcat/trunk/java/org/apache/coyote/Response.java tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ActionCode.java?rev=1480757&r1=1480756&r2=1480757&view=diff == --- tomcat/trunk/java/org/apache/coyote/ActionCode.java (original) +++ tomcat/trunk/java/org/apache/coyote/ActionCode.java Thu May 9 20:18:50 2013 @@ -201,11 +201,6 @@ public enum ActionCode { UPGRADE, /** - * Callback to trigger setting the WriteListener - */ -SET_WRITE_LISTENER, - -/** * Indicator that Servlet is interested in being * notified when data is available to be read */ Modified: tomcat/trunk/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1480757&r1=1480756&r2=1480757&view=diff == --- tomcat/trunk/java/org/apache/coyote/Response.java (original) +++ tomcat/trunk/java/org/apache/coyote/Response.java Thu May 9 20:18:50 2013 @@ -572,8 +572,5 @@ public final class Response { } this.listener = listener; -action(ActionCode.SET_WRITE_LISTENER, null); - -this.listener = listener; } } Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1480757&r1=1480756&r2=1480757&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu May 9 20:18:50 2013 @@ -110,8 +110,8 @@ public abstract class AbstractOutputBuff * the possible need to write HTTP headers, there may be more than one write * to the OutputBuffer. */ -protected volatile LinkedBlockingDeque bufferedWrites = -null; +protected final LinkedBlockingDeque bufferedWrites = +new LinkedBlockingDeque<>(); /** * The max size of the buffered write buffer @@ -620,17 +620,6 @@ public abstract class AbstractOutputBuff /** - * Configure the blocking behaviour of the OutputBuffer. - */ -public final void setBlocking(boolean blocking) { -if (blocking) -bufferedWrites = null; -else -bufferedWrites = new LinkedBlockingDeque<>(); -} - - -/** * Is standard Servlet blocking IO being used for output? */ protected final boolean isBlocking() { Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1480757&r1=1480756&r2=1480757&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Thu May 9 20:18:50 2013 @@ -520,8 +520,6 @@ public class Http11NioProcessor extends if (asyncStateMachine.asyncDispatch()) { ((NioEndpoint)endpoint).dispatchForEvent(this.socket.getSocket(),SocketStatus.OPEN_READ, true); } -} else if (actionCode == ActionCode.SET_WRITE_LISTENER) { -outputBuffer.setBlocking(false); } } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1480757&r1=1480756&r2=1480757&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu May 9 20:18:50 2013 @@ -95,8 +95,8 @@ public class InternalNioOutputBuffer ext socket.getBufHandler().getWriteBuffer().clear(); socket = null; } -setBlocking(true); flipped = false; +bufferedWrites.clear(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: de
svn commit: r1480759 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractOutputBuffer.java InternalNioOutputBuffer.java
Author: markt Date: Thu May 9 20:22:01 2013 New Revision: 1480759 URL: http://svn.apache.org/r1480759 Log: Missed a few things with the refactoring to remove SET_WRITE_LISTENER Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1480759&r1=1480758&r2=1480759&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu May 9 20:22:01 2013 @@ -316,6 +316,7 @@ public abstract class AbstractOutputBuff public void recycle() { // Sub-classes may wish to do more than this. nextRequest(); +bufferedWrites.clear(); } /** Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1480759&r1=1480758&r2=1480759&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu May 9 20:22:01 2013 @@ -96,7 +96,6 @@ public class InternalNioOutputBuffer ext socket = null; } flipped = false; -bufferedWrites.clear(); } @@ -252,7 +251,7 @@ public class InternalNioOutputBuffer ext dataLeft = hasMoreDataToFlush(); -if (!dataLeft && bufferedWrites!=null) { +if (!dataLeft && bufferedWrites.size() > 0) { Iterator bufIter = bufferedWrites.iterator(); while (!hasMoreDataToFlush() && bufIter.hasNext()) { ByteBufferHolder buffer = bufIter.next(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54947] New: Http11NioProtocol generates HTTP 505 responses on valid requests if request is split across multiple packets
https://issues.apache.org/bugzilla/show_bug.cgi?id=54947 Bug ID: 54947 Summary: Http11NioProtocol generates HTTP 505 responses on valid requests if request is split across multiple packets Product: Tomcat 6 Version: 6.0.36 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: greg.2.har...@nokia.com Classification: Unclassified If an HTTP request is broken up across multiple packets *and* the first packet contains a GET request up to "\r" AND the "\n" terminating the first line of the request is included in the next packet Tomcat incorrectly throws an HTTP "505 Version Not Supported" response. This is with the Http11NioProtocol connector only - the default HTTP/1.1 connector does not exhibit this problem. An example request: Packet 1: GET / HTTP/1.1\r Packet 2: \nHost: localhost\r\n Packet 3: Connection: Close\r\n\r\n Response: HTTP/1.1 505 HTTP Version Not Supported Server: Apache-Coyote/1.1 Date: Thu, 09 May 2013 20:23:58 GMT Connection: close The following Python program reproduces the problem for me in both Tomcat 6.0.37 and Tomcat 7.0.39: """ #!/usr/bin/python import socket import time s = socket.socket() s.connect(("localhost",8080)) s.sendall("GET / HTTP/1.1\r") time.sleep(1.5) # make sure the above goes out in its own packet s.sendall("\nHost: localhost\r\n") s.sendall("Connection: close\r\n\r\n") print s.makefile().read() """ Moving the "\n" to from the second sendall to the end of the first sendall causes Tomcat to respond correctly. -- 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: r1480783 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: markt Date: Thu May 9 21:29:21 2013 New Revision: 1480783 URL: http://svn.apache.org/r1480783 Log: Stop tests failing because nbRead isn't implemented. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1480783&r1=1480782&r2=1480783&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Thu May 9 21:29:21 2013 @@ -624,8 +624,9 @@ public class InternalAprInputBuffer exte @Override protected int nbRead() throws IOException { +return 0; // TODO -throw new UnsupportedOperationException("APR non-blocking read"); +// throw new UnsupportedOperationException("APR non-blocking read"); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1480786 - in /tomcat/trunk/java/org/apache: coyote/http11/InternalAprOutputBuffer.java tomcat/util/net/AprEndpoint.java
Author: markt Date: Thu May 9 21:30:30 2013 New Revision: 1480786 URL: http://svn.apache.org/r1480786 Log: Implement non-blocking write for APR. Add some trace level debug code to AprEndpoint that was useful in getting this working. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=1480786&r1=1480785&r2=1480786&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Thu May 9 21:30:30 2013 @@ -20,13 +20,17 @@ package org.apache.coyote.http11; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Iterator; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock; import org.apache.coyote.OutputBuffer; import org.apache.coyote.Response; import org.apache.tomcat.jni.Socket; +import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.http.HttpMessages; import org.apache.tomcat.util.net.AbstractEndpoint; +import org.apache.tomcat.util.net.AprEndpoint; import org.apache.tomcat.util.net.SocketWrapper; /** @@ -85,6 +89,16 @@ public class InternalAprOutputBuffer ext private final ByteBuffer bbuf; +/** + * false if bbuf is ready to be written to and + * true is ready to be read from. + */ +private volatile boolean flipped = false; + + +private AbstractEndpoint endpoint; + + // - Public Methods @Override @@ -93,6 +107,8 @@ public class InternalAprOutputBuffer ext wrapper = socketWrapper; socket = socketWrapper.getSocket().longValue(); +this.endpoint = endpoint; + Socket.setsbb(this.socket, bbuf); } @@ -107,6 +123,8 @@ public class InternalAprOutputBuffer ext super.recycle(); bbuf.clear(); +flipped = false; + wrapper = null; } @@ -156,15 +174,21 @@ public class InternalAprOutputBuffer ext if (length == 0) return; -// Try to flush any data in the socket's write buffer first -boolean dataLeft = flushBuffer(isBlocking()); +// If bbuf is currently being used for writes, add this data to the +// write buffer +if (flipped) { +addToBuffers(buf, offset, length); +return; +} // Keep writing until all the data is written or a non-blocking write // leaves data in the buffer -while (!dataLeft && length > 0) { +while (length > 0) { int thisTime = length; if (bbuf.position() == bbuf.capacity()) { -flushBuffer(isBlocking()); +if (flushBuffer(isBlocking())) { +break; +} } if (thisTime > bbuf.capacity() - bbuf.position()) { thisTime = bbuf.capacity() - bbuf.position(); @@ -180,7 +204,6 @@ public class InternalAprOutputBuffer ext // Buffer the remaining data addToBuffers(buf, offset, length); } - } @@ -199,17 +222,16 @@ public class InternalAprOutputBuffer ext * Callback to write data from the buffer. */ @Override -protected boolean flushBuffer(boolean block) throws IOException { +protected synchronized boolean flushBuffer(boolean block) +throws IOException { wrapper.access(); -boolean dataLeft = hasMoreDataToFlush(); - -if (dataLeft) { -writeToSocket(); +if (hasMoreDataToFlush()) { +writeToSocket(block); } -if (!dataLeft && bufferedWrites!=null) { +if (bufferedWrites.size() > 0) { Iterator bufIter = bufferedWrites.iterator(); while (!hasMoreDataToFlush() && bufIter.hasNext()) { ByteBufferHolder buffer = bufIter.next(); @@ -219,25 +241,82 @@ public class InternalAprOutputBuffer ext if (buffer.getBuf().remaining() == 0) { bufIter.remove(); } -writeToSocket(); +writeToSocket(block); //here we must break if we didn't finish the write } } } -dataLeft = hasMoreDataToFlush(); - return hasMoreDataToFlush(); } +private void writeToSocket(boolean block) throws IOException { + +Lock readLock = wrapper.getBlockingStatusReadLock(); +WriteLock writeLock = wrapper.g
svn commit: r1480850 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Fri May 10 01:44:39 2013 New Revision: 1480850 URL: http://svn.apache.org/r1480850 Log: use last 7.0.40 Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1480850&r1=1480849&r2=1480850&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Fri May 10 01:44:39 2013 @@ -73,7 +73,7 @@ 2001 2008 -7.0.39 +7.0.40 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org