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:32:47 UTC

[tomcat] branch 8.5.x updated (010f0eba58 -> fb71303800)

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

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


    from 010f0eba58 Fix corruption spotted when preparing 10.0.x release
     new 0d94835b59 Fix indent
     new fb71303800 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] 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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit fb71303800c32102fc9fe7c66b73ca7529e88166
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 5f46bb2969..0b84eef2a1 100644
--- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java
+++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
@@ -306,4 +306,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


[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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0d94835b59e3d2e6b938d36ecbdd749c63694fda
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 31391f23aa..5f46bb2969 100644
--- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java
+++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java
@@ -294,7 +294,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