diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java index 525c9e696c..261e8d874c 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java @@ -1176,6 +1176,10 @@ public abstract class HttpHeaders implements Iterable> return true; } + if (name1 == null || name2 == null) { + return false; + } + int nameLen = name1.length(); if (nameLen != name2.length()) { return false;