Obviously you know better than me, but here's my understanding...

In Netty 4, all HTTP transfers are "chunked" in the Netty 3 sense.  They all comprise a HttpResponse, 0 or more HttpContent messages, then HttpLastContent.

We're trying to tell SPDY if it's the final frame of the stream; the correct way to do that is to check for instanceof HttpLastContent.  That's done in the encode() function (which calls this function).

(There is now a potentially missed optimization, in that we'll always send a SPDY data frame, even if it's empty, but I'm focusing on getting things working again first!)