diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java index acf98b3aa4..d37ef0c9d5 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java @@ -458,7 +458,7 @@ public class HttpResponseStatus implements Comparable { int code = Integer.parseInt(status.substring(0, space)); String reasonPhrase = status.substring(space + 1); HttpResponseStatus responseStatus = valueOf(code); - if (responseStatus.reasonPhrase().toString().equals(reasonPhrase)) { + if (responseStatus.reasonPhrase().contentEquals(reasonPhrase)) { return responseStatus; } else { return new HttpResponseStatus(code, reasonPhrase); @@ -510,7 +510,7 @@ public class HttpResponseStatus implements Comparable { status = valueOf(code); if (codeEnd < string.length()) { String actualReason = string.toString(codeEnd + 1, string.length()); - if (!status.reasonPhrase().equals(actualReason)) { + if (!status.reasonPhrase().contentEquals(actualReason)) { status = new HttpResponseStatus(code, actualReason); } }