<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Netty wait to receive the 8 bytes, it's hard coded.</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> <span style="color: #991664">private</span> <span style="color: #991664">static</span> <span style="color: #991664">int</span> getWebSocketContentLength(HttpMessage message) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(67, 144, 117); "><span style="color: #000000"> </span>// WebSockset messages have constant content-lengths.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> <span style="color: #991664">if</span> (message <span style="color: #991664">instanceof</span> HttpRequest) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> HttpRequest req = (HttpRequest) message;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> <span style="color: #991664">if</span> (HttpMethod.<span style="color: #132bc3">GET</span>.equals(req.getMethod()) &&</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> req.containsHeader(Names.<span style="color: #132bc3">SEC_WEBSOCKET_KEY1</span>) &&</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> req.containsHeader(Names.<span style="color: #132bc3">SEC_WEBSOCKET_KEY2</span>)) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> <span style="color: #991664">return</span> 8;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> }</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">That's why workingRequest work and not notWorkingRequest.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">I really don't know how to deal with this scary spec.</div><br><div><div>Le 27 juin 2011 à 22:14, Marc Hämmerle a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hope this helps. Just try with either "workingRequest" or "notWorkingRequest" to see that in the latter case the handler for received messages will not be called.</div><div><br></div><div><a href="https://gist.github.com/1049708">https://gist.github.com/1049708</a></div><div><br></div><div><script src="<a href="https://gist.github.com/1049708.js?file=gistfile1.scala">https://gist.github.com/1049708.js?file=gistfile1.scala</a>"></script></div><br><div><div>Am 27.06.2011 um 15:57 schrieb 이희승 (Trustin Lee):</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Sure. Please go ahead. I haven't checked the issue yet though.<br>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></blockquote></div><br></div>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/netty-users</blockquote></div><br></body></html>