From 313365cd5c313044247ef7b20fdffd230f4a07d5 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 28 Nov 2013 15:51:13 +0900 Subject: [PATCH] Fix NPE raised by HttpHeaders.equalsIgnoreCases() when one of its arguments is null --- .../main/java/io/netty/handler/codec/http/HttpHeaders.java | 4 ++++ 1 file changed, 4 insertions(+) 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 9001a4223b38..7ba9264109f5 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 @@ -1161,6 +1161,10 @@ public static boolean equalsIgnoreCase(CharSequence name1, CharSequence name2) { return true; } + if (name1 == null || name2 == null) { + return false; + } + int nameLen = name1.length(); if (nameLen != name2.length()) { return false;