Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x

This commit is contained in:
Jan Bartel 2018-01-12 22:24:17 +01:00
commit 7b2e490036
6 changed files with 9 additions and 16 deletions

View File

@ -110,7 +110,7 @@ public enum HttpCompliance // TODO in Jetty-10 convert this enum to a class so t
case "RFC2616":
sections = EnumSet.complementOf(EnumSet.of(
HttpComplianceSection.NO_FIELD_FOLDING,
HttpComplianceSection.NO_HTTP_9));
HttpComplianceSection.NO_HTTP_0_9));
i++;
break;

View File

@ -28,8 +28,7 @@ public enum HttpComplianceSection
FIELD_NAME_CASE_INSENSITIVE("https://tools.ietf.org/html/rfc7230#section-3.2","Field name is case-insensitive"),
NO_WS_AFTER_FIELD_NAME("https://tools.ietf.org/html/rfc7230#section-3.2.4","Whitespace not allowed after field name"),
NO_FIELD_FOLDING("https://tools.ietf.org/html/rfc7230#section-3.2.4","No line Folding"),
NO_HTTP_9("https://tools.ietf.org/html/rfc7230#appendix-A.2","No HTTP/0.9"),
;
NO_HTTP_0_9("https://tools.ietf.org/html/rfc7230#appendix-A.2","No HTTP/0.9");
final String url;
final String description;

View File

@ -764,7 +764,7 @@ public class HttpParser
else if (b < HttpTokens.SPACE && b>=0)
{
// HTTP/0.9
if (complianceViolation(HttpComplianceSection.NO_HTTP_9,"No request version"))
if (complianceViolation(HttpComplianceSection.NO_HTTP_0_9,"No request version"))
throw new BadMessageException("HTTP/0.9 not supported");
handle=_requestHandler.startRequest(_methodString,_uri.toString(), HttpVersion.HTTP_0_9);
setState(State.END);
@ -831,7 +831,7 @@ public class HttpParser
else
{
// HTTP/0.9
if (complianceViolation(HttpComplianceSection.NO_HTTP_9,"No request version"))
if (complianceViolation(HttpComplianceSection.NO_HTTP_0_9,"No request version"))
throw new BadMessageException("HTTP/0.9 not supported");
handle=_requestHandler.startRequest(_methodString,_uri.toString(), HttpVersion.HTTP_0_9);

View File

@ -128,7 +128,7 @@ public class HttpParserTest
Assert.assertEquals("/999", _uriOrStatus);
Assert.assertEquals("HTTP/0.9", _versionOrReason);
Assert.assertEquals(-1, _headers);
Assert.assertThat(_complianceViolation, contains(HttpComplianceSection.NO_HTTP_9));
Assert.assertThat(_complianceViolation, contains(HttpComplianceSection.NO_HTTP_0_9));
}
@Test
@ -157,7 +157,7 @@ public class HttpParserTest
Assert.assertEquals("/222", _uriOrStatus);
Assert.assertEquals("HTTP/0.9", _versionOrReason);
Assert.assertEquals(-1, _headers);
Assert.assertThat(_complianceViolation, contains(HttpComplianceSection.NO_HTTP_9));
Assert.assertThat(_complianceViolation, contains(HttpComplianceSection.NO_HTTP_0_9));
}
@Test

View File

@ -33,7 +33,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@ -41,7 +40,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
@ -799,7 +797,6 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
private class StopSelector implements SelectorUpdate
{
CountDownLatch _stopped = new CountDownLatch(1);
boolean _forcedEndPointClose = false;
@Override
public void update(Selector selector)
@ -810,12 +807,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
{
Object attachment = key.attachment();
if (attachment instanceof EndPoint)
{
EndPoint endp = (EndPoint)attachment;
if (!endp.isOutputShutdown())
_forcedEndPointClose = true;
closeNoExceptions((EndPoint)attachment);
}
}
}

View File

@ -44,7 +44,9 @@ public class MavenWebInfConfiguration extends WebInfConfiguration
public MavenWebInfConfiguration()
{
hide("org.apache.maven.",
"org.codehaus.plexus.");
"org.codehaus.plexus.",
"javax.enterprise.",
"javax.decorator.");
}
@Override