[tomcat8] 04/10: Fixed the test failure in Test*NonLoginAndBasicAuthenticator caused by recent JREs

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Nov 23 19:54:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch jessie
in repository tomcat8.

commit 5cc9a8b2251af3134543552e837f14ed2f601eca
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Nov 23 13:28:40 2016 +0100

    Fixed the test failure in Test*NonLoginAndBasicAuthenticator caused by recent JREs
---
 debian/changelog                                   |  2 +
 .../fix-TestNonLoginAndBasicAuthenticator.patch    | 65 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 68 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index da86f49..6dcf623 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ tomcat8 (8.0.14-1+deb8u5) UNRELEASED; urgency=medium
   * Backported the fix for upstream bug 57377: Remove the restriction that
     prevented the use of SSL when specifying a bind address for the JMX/RMI
     server. Enable SSL to be configured for the registry as well as the server.
+  * Backported a fix for a test failure in Test*NonLoginAndBasicAuthenticator
+    with recent JREs
 
  -- Emmanuel Bourg <ebourg at apache.org>  Tue, 22 Nov 2016 23:21:56 +0100
 
diff --git a/debian/patches/fix-TestNonLoginAndBasicAuthenticator.patch b/debian/patches/fix-TestNonLoginAndBasicAuthenticator.patch
new file mode 100644
index 0000000..920af87
--- /dev/null
+++ b/debian/patches/fix-TestNonLoginAndBasicAuthenticator.patch
@@ -0,0 +1,65 @@
+Description: Don't add ":" to cookie name. It is illegal in newer JREs
+Origin: backport, https://svn.apache.org/r1715544
+                  https://svn.apache.org/r1715549
+--- a/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
++++ b/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
+@@ -357,7 +357,7 @@
+         Map<String,List<String>> respHeaders = new HashMap<>();
+ 
+         if (useCookie && (cookies != null)) {
+-            reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
++            reqHeaders.put(CLIENT_COOKIE_HEADER, cookies);
+         }
+ 
+         ByteChunk bc = new ByteChunk();
+@@ -380,7 +380,7 @@
+         Map<String,List<String>> respHeaders = new HashMap<>();
+ 
+         if (useCookie && (cookies != null)) {
+-            reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
++            reqHeaders.put(CLIENT_COOKIE_HEADER, cookies);
+         }
+         else {
+             if (credentials != null) {
+--- a/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
++++ b/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
+@@ -355,7 +355,7 @@
+         Map<String,List<String>> respHeaders = new HashMap<>();
+ 
+         if (useCookie && (cookies != null)) {
+-            reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
++            reqHeaders.put(CLIENT_COOKIE_HEADER, cookies);
+         }
+ 
+         ByteChunk bc = new ByteChunk();
+@@ -379,7 +379,7 @@
+         Map<String,List<String>> respHeaders = new HashMap<>();
+ 
+         if (useCookie && (cookies != null)) {
+-            reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
++            reqHeaders.put(CLIENT_COOKIE_HEADER, cookies);
+         }
+         else {
+             if (credentials != null) {
+@@ -565,7 +565,7 @@
+     protected void addCookies(Map<String,List<String>> reqHeaders) {
+ 
+         if ((cookies != null) && (cookies.size() > 0)) {
+-            reqHeaders.put(CLIENT_COOKIE_HEADER + ":", cookies);
++            reqHeaders.put(CLIENT_COOKIE_HEADER, cookies);
+         }
+     }
+ 
+--- a/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
++++ b/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
+@@ -479,7 +479,7 @@
+     protected void addCookies(Map<String,List<String>> reqHeaders) {
+ 
+         if ((cookies != null) && (cookies.size() > 0)) {
+-            reqHeaders.put(BROWSER_COOKIES + ":", cookies);
++            reqHeaders.put(BROWSER_COOKIES, cookies);
+         }
+     }
+-}
+\ No newline at end of file
++}
diff --git a/debian/patches/series b/debian/patches/series
index c2c2dcf..51ea4ad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,6 +12,7 @@
 0018-fix-manager-webapp.patch
 0019-add-distribution-to-error-page.patch
 #0020-disable-java8-support-with-jdtcompiler.patch
+fix-TestNonLoginAndBasicAuthenticator.patch
 CVE-2014-7810.patch
 CVE-2015-5174.patch
 CVE-2015-5345.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat8.git



More information about the pkg-java-commits mailing list