From 89e51aadbe5e524fb87c4f9457b39a871e4b0e2b Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 29 Mar 2017 12:15:06 +1100 Subject: [PATCH] Issue #1433 --- .../src/main/java/org/eclipse/jetty/http/HttpStatus.java | 4 ++-- .../java/org/eclipse/jetty/http/HttpStatusCodeTest.java | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java index 5ff024191ea..265cb8194b3 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java @@ -73,7 +73,7 @@ public class HttpStatus public final static int REQUESTED_RANGE_NOT_SATISFIABLE_416 = 416; public final static int RANGE_NOT_SATISFIABLE_416 = 416; public final static int EXPECTATION_FAILED_417 = 417; - public final static int IM_A_TEAPOT_418 = 417; + public final static int IM_A_TEAPOT_418 = 418; public final static int ENHANCE_YOUR_CALM_420 = 420; public final static int MISDIRECTED_REQUEST_421 = 421; public final static int UNPROCESSABLE_ENTITY_422 = 422; @@ -153,7 +153,7 @@ public class HttpStatus UNSUPPORTED_MEDIA_TYPE(UNSUPPORTED_MEDIA_TYPE_415, "Unsupported Media Type"), RANGE_NOT_SATISFIABLE(RANGE_NOT_SATISFIABLE_416, "Range Not Satisfiable"), EXPECTATION_FAILED(EXPECTATION_FAILED_417, "Expectation Failed"), - IM_A_TEAPOT(IM_A_TEAPOT_418, "Im a Teapot"), + IM_A_TEAPOT(IM_A_TEAPOT_418, "I'm a Teapot"), ENHANCE_YOUR_CALM(ENHANCE_YOUR_CALM_420, "Enhance your Calm"), MISDIRECTED_REQUEST(MISDIRECTED_REQUEST_421, "Misdirected Request"), UNPROCESSABLE_ENTITY(UNPROCESSABLE_ENTITY_422, "Unprocessable Entity"), diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpStatusCodeTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpStatusCodeTest.java index 609ef2aa892..9f9c24eb046 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpStatusCodeTest.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpStatusCodeTest.java @@ -31,6 +31,14 @@ public class HttpStatusCodeTest assertNull("Invalid code: 800", HttpStatus.getCode(800)); assertNull("Invalid code: 190", HttpStatus.getCode(190)); } + + + @Test + public void testImATeapot() + { + assertEquals("I'm a Teapot", HttpStatus.getMessage(418)); + assertEquals("Expectation Failed", HttpStatus.getMessage(417)); + } public void testHttpMethod() {