You should just be able to:

```scala
response.setHeader("Connection", "close");
```

And then you don't need to convert the message to a buffer, you can just `event.getChannel.write(response)`.  The Netty HttpResponseEncoder sits downstream of this, and will do the encoding for you.