Merge pull request #3015 from eclipse/jetty-10.x-issue-3009-non-LEGACY-modes

Issue #3009 - Defaulting to non-LEGACY compliance modes
This commit is contained in:
Joakim Erdfelt 2018-10-22 16:22:30 -05:00 committed by GitHub
commit 6b5631495f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -64,9 +64,11 @@ public class HttpReceiverOverHTTPTest
public static Stream<Arguments> complianceModes() throws Exception
{
return Stream.of(
HttpCompliance.LEGACY,
HttpCompliance.RFC2616_LEGACY,
HttpCompliance.RFC7230_LEGACY
HttpCompliance.RFC7230,
HttpCompliance.RFC2616,
HttpCompliance.LEGACY,
HttpCompliance.RFC2616_LEGACY,
HttpCompliance.RFC7230_LEGACY
).map(Arguments::of);
}

View File

@ -330,7 +330,7 @@ public class ResponseContentParser extends StreamContentParser
{
private FCGIHttpParser(ResponseHandler handler)
{
super(handler, 65 * 1024, HttpCompliance.LEGACY);
super(handler, 65 * 1024, HttpCompliance.RFC7230);
reset();
}

View File

@ -18,11 +18,14 @@
package org.eclipse.jetty.fcgi.parser;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.nio.ByteBuffer;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -34,6 +37,7 @@ import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.MappedByteBufferPool;
import org.eclipse.jetty.util.URIUtil;
import org.junit.jupiter.api.Test;
public class ClientParserTest
@ -80,7 +84,7 @@ public class ClientParserTest
switch (field.getName())
{
case contentTypeName:
assertEquals(contentTypeValue, field.getValue());
assertEquals(contentTypeValue, field.getValue().toLowerCase(Locale.ENGLISH));
params.set(params.get() * primes[1]);
break;
default: