|
|
|
|
@ -21,14 +21,12 @@ import java.nio.charset.StandardCharsets;
@@ -21,14 +21,12 @@ import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.zip.GZIPInputStream; |
|
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
import org.junit.jupiter.api.extension.ExtendWith; |
|
|
|
|
import smoketest.jetty.util.RandomStringUtil; |
|
|
|
|
import smoketest.jetty.util.StringUtil; |
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest; |
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; |
|
|
|
|
import org.springframework.boot.test.system.OutputCaptureExtension; |
|
|
|
|
import org.springframework.boot.test.web.client.TestRestTemplate; |
|
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
|
@ -46,9 +44,9 @@ import static org.assertj.core.api.Assertions.assertThat;
@@ -46,9 +44,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
* @author Andy Wilkinson |
|
|
|
|
* @author Florian Storz |
|
|
|
|
* @author Michael Weidmann |
|
|
|
|
* @author Moritz Halbritter |
|
|
|
|
*/ |
|
|
|
|
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) |
|
|
|
|
@ExtendWith(OutputCaptureExtension.class) |
|
|
|
|
class SampleJettyApplicationTests { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
@ -85,7 +83,7 @@ class SampleJettyApplicationTests {
@@ -85,7 +83,7 @@ class SampleJettyApplicationTests {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void testMaxHttpRequestHeaderSize() { |
|
|
|
|
String headerValue = RandomStringUtil.getRandomBase64EncodedString(this.maxHttpRequestHeaderSize + 1); |
|
|
|
|
String headerValue = StringUtil.repeat('A', this.maxHttpRequestHeaderSize + 1); |
|
|
|
|
HttpHeaders headers = new HttpHeaders(); |
|
|
|
|
headers.add("x-max-request-header", headerValue); |
|
|
|
|
HttpEntity<?> httpEntity = new HttpEntity<>(headers); |
|
|
|
|
|