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
commit 83801d7d8482855d3cad43b3e73920b15964b667 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jan 25 17:56:41 2023 +0000 Add test for new default Chrome priority value Reported to be causing issues for some servers --- .../tomcat/util/http/parser/TestPriority.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/org/apache/tomcat/util/http/parser/TestPriority.java b/test/org/apache/tomcat/util/http/parser/TestPriority.java new file mode 100644 index 0000000000..eeac940f6e --- /dev/null +++ b/test/org/apache/tomcat/util/http/parser/TestPriority.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http.parser; + +import java.io.Reader; +import java.io.StringReader; + +import org.junit.Assert; +import org.junit.Test; + +public class TestPriority { + + @Test + public void testOnlyIncremental() throws Exception { + String input = "i"; + Reader reader = new StringReader(input); + + Priority p = Priority.parsePriority(reader); + + Assert.assertEquals(Priority.DEFAULT_URGENCY, p.getUrgency()); + Assert.assertTrue(p.getIncremental()); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org