Fixed by https://github.com/netty/netty/pull/4565

AsciiString.contentEqualsIgnoreCase does not work correctly for AsciiString comparison
Netty Version: master (6c0fef133baa4afce11953110a6947732d87ec8e)

`AsciiString.contentEqualsIgnoreCase` fails when checking for equality between two `AsciiString` objects. For example 

``` java
// returns true, should return false 
new AsciiString("foo").contentEqualsIgnoreCase(new AsciiString("bar"));
```

The issue is due to [the following line](https://github.com/netty/netty/blob/master/common/src/main/java/io/netty/util/AsciiString.java#L533)

I think I've tracked this down to the following commit: https://github.com/netty/netty/commit/ba6ce5449ee852b782dde9a11933f6a09b123e22

Pull request to follow

common/src/main/java/io/netty/util/AsciiString.java
common/src/main/java/io/netty/util/AsciiString.java
common/src/test/java/io/netty/util/AsciiStringCharacterTest.java
diff --git a/common/src/main/java/io/netty/util/AsciiString.java b/common/src/main/java/io/netty/util/AsciiString.java
index ceb5bf0ca59..8baf6851c4a 100644
--- a/common/src/main/java/io/netty/util/AsciiString.java
+++ b/common/src/main/java/io/netty/util/AsciiString.java
@@ -530,7 +530,7 @@ public boolean contentEqualsIgnoreCase(CharSequence string) {
         if (string.getClass() == AsciiString.class) {
             AsciiString rhs = (AsciiString) string;
             for (int i = arrayOffset(), j = rhs.arrayOffset(); i < length(); ++i, ++j) {
-                if (!equalsIgnoreCase(value[i], value[j])) {
+                if (!equalsIgnoreCase(value[i], rhs.value[j])) {
                     return false;
                 }
             }

diff --git a/common/src/test/java/io/netty/util/AsciiStringCharacterTest.java b/common/src/test/java/io/netty/util/AsciiStringCharacterTest.java
index cbec28140d3..08f2bab2c21 100644
--- a/common/src/test/java/io/netty/util/AsciiStringCharacterTest.java
+++ b/common/src/test/java/io/netty/util/AsciiStringCharacterTest.java
@@ -240,6 +240,16 @@ public void testEqualsIgnoreCase() {
         assertThat(AsciiString.contentEqualsIgnoreCase(null, "foo"), is(false));
         assertThat(AsciiString.contentEqualsIgnoreCase("bar", null), is(false));
         assertThat(AsciiString.contentEqualsIgnoreCase("FoO", "fOo"), is(true));
+
+        // Test variations (Ascii + String, Ascii + Ascii, String + Ascii)
+        assertThat(AsciiString.contentEqualsIgnoreCase(new AsciiString("FoO"), "fOo"), is(true));
+        assertThat(AsciiString.contentEqualsIgnoreCase(new AsciiString("FoO"), new AsciiString("fOo")), is(true));
+        assertThat(AsciiString.contentEqualsIgnoreCase("FoO", new AsciiString("fOo")), is(true));
+
+        // Test variations (Ascii + String, Ascii + Ascii, String + Ascii)
+        assertThat(AsciiString.contentEqualsIgnoreCase(new AsciiString("FoO"), "bAr"), is(false));
+        assertThat(AsciiString.contentEqualsIgnoreCase(new AsciiString("FoO"), new AsciiString("bAr")), is(false));
+        assertThat(AsciiString.contentEqualsIgnoreCase("FoO", new AsciiString("bAr")), is(false));
     }
 
     @Test
