diff --git a/src/main/java/org/takes/rs/RsWithType.java b/src/main/java/org/takes/rs/RsWithType.java index 9a4d307b4..f4dd85a48 100644 --- a/src/main/java/org/takes/rs/RsWithType.java +++ b/src/main/java/org/takes/rs/RsWithType.java @@ -55,8 +55,7 @@ public RsWithType(final Response res, final CharSequence type) { new RsWithoutHeader( new RsWithStatus(res, HttpURLConnection.HTTP_OK), HEADER - ), - HEADER, type + ), HEADER, type ) ); } diff --git a/src/test/java/org/takes/rs/RsWithTypeTest.java b/src/test/java/org/takes/rs/RsWithTypeTest.java index a309ebb85..89bcd9dfc 100644 --- a/src/test/java/org/takes/rs/RsWithTypeTest.java +++ b/src/test/java/org/takes/rs/RsWithTypeTest.java @@ -44,7 +44,6 @@ public final class RsWithTypeTest { @Test public void replaceTypeToResponse() throws IOException { final String type = "text/plain"; - final String header = "Content-Type: "; MatcherAssert.assertThat( new RsPrint( new RsWithType( @@ -55,7 +54,7 @@ public void replaceTypeToResponse() throws IOException { Matchers.equalTo( Joiner.on("\r\n").join( "HTTP/1.1 200 OK", - header + type, + String.format("Content-Type: %s", type), "", "" )