netty/netty — pull request #1859 by okapies (2013-09-21 15:00:12+00:00)
Title: WebSocket's MD methods will fail when input is backed by non-zero offset array

The message digest methods of `WebSocketUtil` will fail when the specified input buffer is backed by array that have non-zero offset. Attached test can produce the following failure.

```
-------------------------------------------------------------------------------
Test set: org.jboss.netty.handler.codec.http.websocketx.WebSocketUtilTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.082 sec <<< FAILURE!
testSha1(org.jboss.netty.handler.codec.http.websocketx.WebSocketUtilTest) Time elapsed: 0.018 sec <<< FAILURE!
java.lang.AssertionError: expected: org.jboss.netty.buffer.BigEndianHeapChannelBuffer
but was: org.jboss.netty.buffer.BigEndianHeapChannelBuffer
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.failNotEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:128)
at org.junit.Assert.assertEquals(Assert.java:147)
at org.jboss.netty.handler.codec.http.websocketx.WebSocketUtilTest.testSha1(WebSocketUtilTest.java:58)
...
testMd5(org.jboss.netty.handler.codec.http.websocketx.WebSocketUtilTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError: expected: org.jboss.netty.buffer.BigEndianHeapChannelBuffer
but was: org.jboss.netty.buffer.BigEndianHeapChannelBuffer
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.failNotEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:128)
at org.junit.Assert.assertEquals(Assert.java:147)
at org.jboss.netty.handler.codec.http.websocketx.WebSocketUtilTest.testMd5(WebSocketUtilTest.java:43)
...
```