ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/coyote/http2/TestHttp2RequestParameters.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/coyote/http2/TestHttp2RequestParameters.java
Status
scanned
Type
file
Name
TestHttp2RequestParameters.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2106 (2.1 KB)
MD5
8a6eec668371e0582d72d621596e95f3
SHA1
1b8ce964bc6522ce3761a364bd1a7796b93b967a
SHA256
7ebe55440cd1fa4232738418eefafbc353e4fea9f454ddc85d37d816da334075
SHA512

      
    
SHA1_git
b9f3cf3e023a678bfe4433f78915319f24fd4692
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestHttp2RequestParameters.java | 2.1 KB |

/* * 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.coyote.http2; import org.junit.Assert; import org.junit.Test; public class TestHttp2RequestParameters extends Http2TestBase { /** * Test case for https://bz.apache.org/bugzilla/show_bug.cgi?id=69918 POST parameters are not returned from a call * to any of the {@link org.apache.catalina.connector.Request} getParameterXXX() methods if the request is HTTP/2 * and the content-length header is not set. * * @throws Exception If the test encounters an unexpected error */ @Test public void testBug69918() throws Exception { http2Connect(); sendParameterPostRequest(3, null, "a=1&b=2", -1, false); output.setTraceBody(true); boolean foundBody = false; while (parser.readFrame()) { String trace = output.getTrace(); if (trace.contains("3-Body-2")) { foundBody = true; } else if (trace.contains("3-Body-0")) { Assert.fail("Parameter count was 0. Trace: " + trace); } if (trace.contains("3-EndOfStream")) { break; } } Assert.assertTrue("Parameter count should be 2, trace: " + output.getTrace(), foundBody); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
46.3
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9
https://bz.apache.org/bugzilla/show_bug.cgi?id=69918 25 25