You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/08/01 11:31:54 UTC

[tomcat] branch 10.0.x updated (375a9d7aa3 -> da3437d1a4)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from 375a9d7aa3 Skip JNI tests when testing with Tomcat Native 2.x.x and later
     new f05681ce9e Fix indent
     new da3437d1a4 Add test empty parameter - allowed by RFC 9110

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 test/org/apache/tomcat/util/http/parser/TestMediaType.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)


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


[tomcat] 01/02: Fix indent

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f05681ce9ed6d7f2148ea56cec71871282a45348
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Aug 1 12:20:33 2022 +0100

    Fix indent
---
 test/org/apache/tomcat/util/http/parser/TestMediaType.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/http/parser/TestMediaType.java b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
index 35a1d74523..9a577687e3 100644
--- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java
+++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
@@ -302,7 +302,7 @@ public class TestMediaType {
             sb.append(lws);
             return sb.toString();
         }
-}
+    }
 
     @Test
     public void testCase() throws Exception {


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


[tomcat] 02/02: Add test empty parameter - allowed by RFC 9110

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit da3437d1a4c7955beb4cb7d9393d704f5c37a3af
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Aug 1 12:31:01 2022 +0100

    Add test empty parameter - allowed by RFC 9110
    
    Tomcat already allowed this so no functional change.
---
 test/org/apache/tomcat/util/http/parser/TestMediaType.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/org/apache/tomcat/util/http/parser/TestMediaType.java b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
index 9a577687e3..c17d6cd589 100644
--- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java
+++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
@@ -314,4 +314,14 @@ public class TestMediaType {
         Assert.assertEquals("2", m.getParameterValue("B"));
         Assert.assertEquals("2", m.getParameterValue("b"));
     }
+
+    @Test
+    public void TestEmptyParameter() throws Exception {
+        // RFC 9110
+        StringReader sr = new StringReader("type/sub-type;;a=1;;b=2;;");
+        MediaType m = MediaType.parseMediaType(sr);
+
+        Assert.assertEquals("1", m.getParameterValue("a"));
+        Assert.assertEquals("2", m.getParameterValue("b"));
+    }
 }


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