svn commit: r1485603 - /tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 08:03:43 2013
New Revision: 1485603

URL: http://svn.apache.org/r1485603
Log:
Sometimes need a little more time for the cluster to establish

Modified:

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

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java?rev=1485603&r1=1485602&r2=1485603&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java
 Thu May 23 08:03:43 2013
@@ -81,7 +81,7 @@ public class TestOrderInterceptor {
 TesterUtil.addRandomDomain(channels);
 for ( int i=0; i

svn commit: r1485611 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 08:31:04 2013
New Revision: 1485611

URL: http://svn.apache.org/r1485611
Log:
-1 means infinite timeout, not use socket timeout

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1485611&r1=1485610&r2=1485611&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu May 23 
08:31:04 2013
@@ -1435,9 +1435,6 @@ public class AprEndpoint extends Abstrac
 log.debug(msg);
 }
 }
-if (timeout < 0) {
-timeout = getSoTimeout();
-}
 if (timeout <= 0) {
 // Always put a timeout in
 timeout = Integer.MAX_VALUE;



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



svn commit: r1485612 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 08:31:37 2013
New Revision: 1485612

URL: http://svn.apache.org/r1485612
Log:
Be smarter about when we remove a socket from the Poller.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1485612&r1=1485611&r2=1485612&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu May 23 
08:31:37 2013
@@ -1599,12 +1599,14 @@ public class AprEndpoint extends Abstrac
 log.debug("Poller run() adding socket: " +
 info.socket);
 }
-removeFromPoller(info.socket);
 timeouts.remove(info.socket);
 if (info.read() || info.write()) {
 AprSocketWrapper wrapper = connections.get(
 Long.valueOf(info.socket));
 boolean comet = wrapper.isComet();
+if (comet || wrapper.pollerFlags != 0) {
+removeFromPoller(info.socket);
+}
 wrapper.pollerFlags = wrapper.pollerFlags |
 (info.read() ? Poll.APR_POLLIN : 0) |
 (info.write() ? Poll.APR_POLLOUT : 0);



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



buildbot success in ASF Buildbot on tomcat-trunk

2013-05-23 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4361

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot





svn commit: r1485659 - /tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 12:21:16 2013
New Revision: 1485659

URL: http://svn.apache.org/r1485659
Log:
Add missing message

Modified:
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1485659&r1=1485658&r2=1485659&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Thu May 
23 12:21:16 2013
@@ -28,6 +28,7 @@ http11Processor.upgrade=An internal erro
 
 iib.available.readFail=A non-blocking read failed while attempting to 
determine if data was available
 iib.eof.error=Unexpected EOF read on the socket
+iib.failedread=Read failed. Return value was [{0}]
 iib.filter.npe=You may not add a null filter
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 2616 and 
has been ignored.
 iib.invalidmethod=Invalid character (CR or LF) found in method name



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



svn commit: r1485660 - in /tomcat/trunk/java/org/apache/coyote/http11: InternalAprInputBuffer.java LocalStrings.properties

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 12:23:05 2013
New Revision: 1485660

URL: http://svn.apache.org/r1485660
Log:
Better error message

Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties

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=1485660&r1=1485659&r2=1485660&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Thu 
May 23 12:23:05 2013
@@ -634,7 +634,7 @@ public class InternalAprInputBuffer exte
 } else if (-nRead == Status.EAGAIN) {
 return 0;
 } else {
-throw new IOException(sm.getString("iib.failedread",
+throw new IOException(sm.getString("iib.failedread.apr",
 Integer.valueOf(-nRead)));
 }
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1485660&r1=1485659&r2=1485660&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Thu May 
23 12:23:05 2013
@@ -28,7 +28,7 @@ http11Processor.upgrade=An internal erro
 
 iib.available.readFail=A non-blocking read failed while attempting to 
determine if data was available
 iib.eof.error=Unexpected EOF read on the socket
-iib.failedread=Read failed. Return value was [{0}]
+iib.failedread.apr=Read failed with APR/native error code [{0}]
 iib.filter.npe=You may not add a null filter
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 2616 and 
has been ignored.
 iib.invalidmethod=Invalid character (CR or LF) found in method name



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



svn commit: r1485720 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 14:13:14 2013
New Revision: 1485720

URL: http://svn.apache.org/r1485720
Log:
Only try a non-blocking read if non-blocking is being used

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1485720&r1=1485719&r2=1485720&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Thu 
May 23 14:13:14 2013
@@ -1552,7 +1552,8 @@ public abstract class AbstractHttp11Proc
 } catch (IllegalStateException x) {
 registerForEvent(false, true);
 }
-} else if (status == SocketStatus.OPEN_READ) {
+} else if (status == SocketStatus.OPEN_READ &&
+request.getReadListener() != null) {
 try {
 try {
 if (inputBuffer.nbRead()>0) {



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



[Bug 54980] Setting 'cookies' attribute to 'false' in context still generate JSESSIONID cookie

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54980

Violeta Georgieva  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO
 OS||All

--- Comment #1 from Violeta Georgieva  ---
(In reply to comment #0)
> 
> (setting 'cookie' attribute to 'false' in WEB-INF/context.xml)
> 

Did you mean META-INF/context.xml or you really mean WEB-INF/context.xml?


I cannot observe the described behavior on the latest Tomcat version (7.0.40).


Can you provide an example that illustrates the problem against 7.0.40?


Regards
Violeta

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

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



[Bug 54387] Having servlets with same url should at least cause warning

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54387

--- Comment #4 from Loïc Albertin  ---
Hi Mark,

I totally agree with the fact that an URL should be mapped to only one Servlet.
But, I'd like to have your point of view and maybe the one of the Servlet EG
about the following case.

Let's imagine that we have a Servlet annotated with @WebServlet("/an/url") and
a web.xml descriptor that define the same Servlet class with a different
logical name mapped to the same URL through a Servlet mapping.

>From my point of view this is actually the "same" Servlet which is mapped to
this URL and it doesn't contradict the updated paragraph in the Servlet
specification [1].

With the current Tomcat implementation this case will lead to a deployment
failure. My proposed solution is that when different Servlet names with the
same Servlet class are mapped to a same URL the first one defined will be
chosen. This will lead to prefer the one defined in the web descriptor over
annotations.
So, what do you think?

Thanks & regards,
Loïc


[1] "If the effective web.xml (after merging information from fragments and
annotations) contains any url-patterns that are mapped to multiple servlets
then the deployment must fail."

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54387] Having servlets with same url should at least cause warning

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54387

--- Comment #5 from Edson Richter  ---
My understanding is that

Scenario 1:

ServletA -> /my/path/to/servlet
ServletB -> /my/path/to/servlet

Rule: same path to different servlets = failure.


Scenario 2:

ServletA -> /my/path/to/servlet1
ServletA -> /my/path/to/servlet2

Rule: same servlet to different paths: success.



Regards,

Edson

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

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



[Bug 54387] Having servlets with same url should at least cause warning

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54387

--- Comment #6 from Violeta Georgieva  ---
(In reply to comment #4)
> 
> Let's imagine that we have a Servlet annotated with @WebServlet("/an/url")
> and a web.xml descriptor that define the same Servlet class with a different
> logical name mapped to the same URL through a Servlet mapping.
> 


In Servlet Spec 3.0, 8.1.1 @WebServlet

There is an explicit statement that these are two different servlets.

"
If the same servlet class is declared in the deployment
descriptor under a different name, a new instance of the servlet MUST be
instantiated.
"

Regards
Violeta

-- 
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: r1485833 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 19:22:50 2013
New Revision: 1485833

URL: http://svn.apache.org/r1485833
Log:
Correctly init WebSocket to avoid NPE

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1485833&r1=1485832&r2=1485833&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Thu May 23 
19:22:50 2013
@@ -35,6 +35,7 @@ import static org.junit.Assert.fail;
 
 import org.junit.Test;
 
+import org.apache.catalina.Context;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
 import org.apache.tomcat.util.buf.ByteChunk;
@@ -167,7 +168,9 @@ public class TestSsl extends TomcatBaseT
 
 File appDir = new File(getBuildDirectory(), "webapps/examples");
 // app dir is relative to server home
-tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
+Context ctx = tomcat.addWebapp(null, "/examples",
+appDir.getAbsolutePath());
+ctx.addApplicationListener(WsListener.class.getName());
 
 TesterSupport.initSsl(tomcat);
 



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



[Bug 54928] IllegalStateException: Calling [asyncError()] is not valid for a request with Async state [COMPLETING]

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54928

--- Comment #6 from Mark Thomas  ---
I think some other changes might have fixed this. Please can you re-test with
the latest trunk.

-- 
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: r1485847 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 20:50:05 2013
New Revision: 1485847

URL: http://svn.apache.org/r1485847
Log:
Add some NPE protection

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1485847&r1=1485846&r2=1485847&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu May 23 
20:50:05 2013
@@ -1600,9 +1600,12 @@ public class AprEndpoint extends Abstrac
 info.socket);
 }
 timeouts.remove(info.socket);
+AprSocketWrapper wrapper = connections.get(
+Long.valueOf(info.socket));
+if (wrapper == null) {
+continue;
+}
 if (info.read() || info.write()) {
-AprSocketWrapper wrapper = connections.get(
-Long.valueOf(info.socket));
 boolean comet = wrapper.isComet();
 if (comet || wrapper.pollerFlags != 0) {
 removeFromPoller(info.socket);



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



svn commit: r1485854 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 21:19:54 2013
New Revision: 1485854

URL: http://svn.apache.org/r1485854
Log:
Trivial formatting

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1485854&r1=1485853&r2=1485854&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Thu 
May 23 21:19:54 2013
@@ -1556,7 +1556,7 @@ public abstract class AbstractHttp11Proc
 request.getReadListener() != null) {
 try {
 try {
-if (inputBuffer.nbRead()>0) {
+if (inputBuffer.nbRead() > 0) {
 asyncStateMachine.asyncOperation();
 }
 } catch (IOException x) {



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



svn commit: r1485855 - /tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 21:20:27 2013
New Revision: 1485855

URL: http://svn.apache.org/r1485855
Log:
Remove duplicate code

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1485855&r1=1485854&r2=1485855&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Thu May 
23 21:20:27 2013
@@ -464,8 +464,6 @@ public class Http11AprProcessor extends 
 }
 }
 
-} else if (actionCode == ActionCode.AVAILABLE) {
-request.setAvailable(inputBuffer.available());
 } else if (actionCode == ActionCode.COMET_BEGIN) {
 comet = true;
 } else if (actionCode == ActionCode.COMET_END) {



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



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

2013-05-23 Thread markt
Author: markt
Date: Thu May 23 21:37:23 2013
New Revision: 1485862

URL: http://svn.apache.org/r1485862
Log:
Make this public to expand how the class can be used for unit tests.

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

Modified: tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java?rev=1485862&r1=1485861&r2=1485862&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java Thu May 
23 21:37:23 2013
@@ -96,7 +96,7 @@ public abstract class SimpleHttpClient {
 private String responseBody;
 private List bodyUriElements = null;
 
-protected void setPort(int thePort) {
+public void setPort(int thePort) {
 port = thePort;
 }
 



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



[Bug 54928] IllegalStateException: Calling [asyncError()] is not valid for a request with Async state [COMPLETING]

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54928

--- Comment #7 from rstoyanc...@yahoo.com ---
I can confirm the exception no longer appears in the logs. Thanks for fixing
this!

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

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



[Bug 54980] Setting 'cookies' attribute to 'false' in context still generate JSESSIONID cookie

2013-05-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54980

Emac  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Emac  ---
I meant MEAT-INF/.

Sorry, I cannot re-produce it in a clean Tomcat server. Previously, I actually
encountered this issue in Geronimo 3 which embeds Tomcat 7.0.27 version. So it
must be related to the customization in Geronimo server.

Marked it as invalid. Thanks for looking into this.

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