Better name for no HTTP/0.9 #2022
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
de7e3001ef
commit
c7e03d6175
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -786,7 +786,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);
|
||||
|
@ -853,7 +853,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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue