Re: 6 TCK remaining failing tests

2024-01-10 Thread Mark Thomas

On 09/01/2024 18:16, jean-frederic clere wrote:

Hi,

While testing 10.1.18 I have the remaining failing tests:
com/sun/ts/tests/servlet/api/jakarta_servlet_http/cookie/URLClient.java#setMaxAgePositiveTest
com/sun/ts/tests/servlet/pluggability/api/jakarta_servlet_http/cookie/URLClient.java#setMaxAgePositiveTest

Those 2 are due to the TCK expecting the old netscape date format...
somthing like:  "EEE, dd-MMM-yy HH:mm:ss z"
Does it make sense to tell it is a TCK mistake (and report it) or do we 
need to resurrect the old LegacyCookieProcessor?


See https://github.com/jakartaee/servlet/issues/471

Those tests should be excluded. Are you using 6.0.1 of the TCK?


com/sun/ts/tests/servlet/spec/defaultcontextpath/URLClient.java#getDefaultContextPathTest

We know this one won't pass.


+1


com/sun/ts/tests/servlet/spec/security/clientcert/Client.java#clientCertTest
com/sun/ts/tests/servlet/spec/security/clientcertanno/Client.java#clientCertTest

Those 2 are due to key/cert of the TCK being so old: My JVM version 
reject them as too small...


Raise an issue for that please so they get updated for Servlet 6.1


com/sun/ts/tests/signaturetest/servlet/ServletSigTest.java#signatureTest
Do we care about this one?


Yes.

This one should pass although from memory getting the setup right was 
tricky.


If no one complains I will document those as not passing in 
https://cwiki.apache.org/confluence/display/TOMCAT/Servlet+TCK+6.0


Thanks,

Mark


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



Re: 6 TCK remaining failing tests

2024-01-10 Thread jean-frederic clere

On 1/10/24 09:20, Mark Thomas wrote:

Yes.

This one should pass although from memory getting the setup right was 
tricky.


Yes I have found a work-around and it is passing now.

--
Cheers

Jean-Frederic


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



Re: 6 TCK remaining failing tests

2024-01-10 Thread jean-frederic clere

On 1/10/24 09:20, Mark Thomas wrote:

On 09/01/2024 18:16, jean-frederic clere wrote:

Hi,

While testing 10.1.18 I have the remaining failing tests:
com/sun/ts/tests/servlet/api/jakarta_servlet_http/cookie/URLClient.java#setMaxAgePositiveTest
com/sun/ts/tests/servlet/pluggability/api/jakarta_servlet_http/cookie/URLClient.java#setMaxAgePositiveTest

Those 2 are due to the TCK expecting the old netscape date format...
somthing like:  "EEE, dd-MMM-yy HH:mm:ss z"
Does it make sense to tell it is a TCK mistake (and report it) or do 
we need to resurrect the old LegacyCookieProcessor?


See https://github.com/jakartaee/servlet/issues/471

Those tests should be excluded. Are you using 6.0.1 of the TCK?


I have retried with 6.0.1 that helps ;-)




com/sun/ts/tests/servlet/spec/defaultcontextpath/URLClient.java#getDefaultContextPathTest

We know this one won't pass.


+1


With 6.0.1 that is the only one failing.




com/sun/ts/tests/servlet/spec/security/clientcert/Client.java#clientCertTest
com/sun/ts/tests/servlet/spec/security/clientcertanno/Client.java#clientCertTest

Those 2 are due to key/cert of the TCK being so old: My JVM version 
reject them as too small...


Raise an issue for that please so they get updated for Servlet 6.1


It seems they are passing with 6.0.1 so we are GOOD!




com/sun/ts/tests/signaturetest/servlet/ServletSigTest.java#signatureTest
Do we care about this one?


Yes.

This one should pass although from memory getting the setup right was 
tricky.


If no one complains I will document those as not passing in 
https://cwiki.apache.org/confluence/display/TOMCAT/Servlet+TCK+6.0


Thanks,

Mark


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



--
Cheers

Jean-Frederic


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



(tomcat) branch main updated: Implement HttpSession.getAccessor

2024-01-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new efa93c42c8 Implement HttpSession.getAccessor
efa93c42c8 is described below

commit efa93c42c8d9bb40486321b9e9339137d06b1259
Author: Mark Thomas 
AuthorDate: Wed Jan 10 14:17:35 2024 +

Implement HttpSession.getAccessor

This will be included in the Servlet 6.1 API.
---
 java/jakarta/servlet/http/HttpSession.java |  36 ++
 .../catalina/session/LocalStrings.properties   |   7 ++
 .../apache/catalina/session/StandardSession.java   |  10 ++
 .../catalina/session/StandardSessionAccessor.java  |  79 
 .../catalina/session/StandardSessionFacade.java|   6 +
 .../session/TestStandardSessionAccessor.java   | 138 +
 webapps/docs/changelog.xml |  11 ++
 7 files changed, 287 insertions(+)

diff --git a/java/jakarta/servlet/http/HttpSession.java 
b/java/jakarta/servlet/http/HttpSession.java
index ecadd1e9bf..ccd055c8c5 100644
--- a/java/jakarta/servlet/http/HttpSession.java
+++ b/java/jakarta/servlet/http/HttpSession.java
@@ -17,6 +17,7 @@
 package jakarta.servlet.http;
 
 import java.util.Enumeration;
+import java.util.function.Consumer;
 
 import jakarta.servlet.ServletContext;
 
@@ -51,6 +52,10 @@ import jakarta.servlet.ServletContext;
  * 
  * Session information is scoped only to the current web application ( 
ServletContext), so information
  * stored in one context will not be directly visible in another.
+ * 
+ * This object is only valid within the scope of the HTTP request from 
which it was obtained. Once the processing
+ * of that request returns to the container, this object must not be used. If 
there is a requirement to access the
+ * session outside of the scope of an HTTP request then this must be done via 
{@code #getAccessor()}.
  *
  * @see HttpSessionBindingListener
  */
@@ -194,4 +199,35 @@ public interface HttpSession {
  * @exception IllegalStateException if this method is called on an already 
invalidated session
  */
 boolean isNew();
+
+/**
+ * Provides a mechanism for applications to interact with the {@code 
HttpSession} outside of the scope of an HTTP
+ * request.
+ */
+interface Accessor {
+/**
+ * Call to access the session with the same semantics as if the 
session was accessed during an HTTP request.
+ * 
+ * The effect of this call on the session is as if an HTTP request 
starts; {@link Consumer#accept(Object)} is
+ * called with the associated session object enabling the application 
to interact with the session; and, once
+ * that method returns, the HTTP request ends.
+ *
+ * @param sessionConsumer the application provided {@link Consumer} 
instance that will access the session
+ *
+ * @throws IllegalStateException if the session with the ID to which 
the {@link Accessor} is associated is no
+ *   longer valid
+ */
+void access(Consumer sessionConsumer);
+}
+
+/**
+ * Provides a mechanism for applications to interact with the {@code 
HttpSession} outside of the scope of an HTTP
+ * request.
+ *
+ * @return An {@link Accessor} instance linked to the current session ID 
(if the session ID is changed the
+ * {@link Accessor} will no longer be able to access this 
session)
+ *
+ * @throws IllegalStateException if this method is called on an invalid 
session
+ */
+Accessor getAccessor();
 }
diff --git a/java/org/apache/catalina/session/LocalStrings.properties 
b/java/org/apache/catalina/session/LocalStrings.properties
index eba297f8d9..6e8344ad02 100644
--- a/java/org/apache/catalina/session/LocalStrings.properties
+++ b/java/org/apache/catalina/session/LocalStrings.properties
@@ -73,6 +73,7 @@ standardManager.unloading.nosessions=No persisted sessions to 
unload
 
 standardSession.attributeEvent=Session attribute event listener threw exception
 standardSession.bindingEvent=Session binding event listener threw exception
+standardSession.getAccessor.ise=getAccessor: Session already invalidated
 standardSession.getAttribute.ise=getAttribute: Session already invalidated
 standardSession.getAttributeNames.ise=getAttributeNames: Session already 
invalidated
 standardSession.getCreationTime.ise=getCreationTime: Session already 
invalidated
@@ -92,3 +93,9 @@ standardSession.sessionEvent=Session event listener threw 
exception
 standardSession.setAttribute.iae=setAttribute: Non-serializable attribute [{0}]
 standardSession.setAttribute.ise=setAttribute: Session [{0}] has already been 
invalidated
 standardSession.setAttribute.namenull=setAttribute: name parameter cannot be 
null
+
+standardSessionAccessor.access.end=Unexpected error during 

Buildbot failure in on tomcat-11.0.x

2024-01-10 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/852
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] efa93c42c8d9bb40486321b9e9339137d06b1259


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



(tomcat) branch main updated: Add new class

2024-01-10 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new a2ea4891b5 Add new class
a2ea4891b5 is described below

commit a2ea4891b5a68242441df8acffd9a2ae81852553
Author: remm 
AuthorDate: Wed Jan 10 16:15:33 2024 +0100

Add new class
---
 java/jakarta/el/ImportHandler.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/jakarta/el/ImportHandler.java 
b/java/jakarta/el/ImportHandler.java
index 2d55b7c285..8cb86f990e 100644
--- a/java/jakarta/el/ImportHandler.java
+++ b/java/jakarta/el/ImportHandler.java
@@ -87,13 +87,14 @@ public class ImportHandler {
 servletClassNames.add("UnavailableException");
 standardPackages.put("jakarta.servlet", servletClassNames);
 
-// Servlet 6.0
+// Servlet 6.1
 Set servletHttpClassNames = new HashSet<>();
 // Interfaces
 servletHttpClassNames.add("HttpServletMapping");
 servletHttpClassNames.add("HttpServletRequest");
 servletHttpClassNames.add("HttpServletResponse");
 servletHttpClassNames.add("HttpSession");
+servletHttpClassNames.add("HttpSession.Accessor");
 servletHttpClassNames.add("HttpSessionActivationListener");
 servletHttpClassNames.add("HttpSessionAttributeListener");
 servletHttpClassNames.add("HttpSessionBindingListener");


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



Buildbot success in on tomcat-11.0.x

2024-01-10 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/853
Blamelist: Mark Thomas , remm 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] a2ea4891b5a68242441df8acffd9a2ae81852553


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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