serverResponse.setStatus(HttpResponseStatus.valueOf(responseStatus));
HttpResponseHeaders responseHeaders = serverResponse.getHeaders();
for(Map.Entry<String, List<Object>> header : response.getHttpHeaders().entrySet()){
responseHeaders.setHeader(header.getKey(), header.getValue());
}
return new ByteBufOutputStream(contentBuffer);
}
@Override
public void finish() {
serverResponse.writeAndFlush(contentBuffer);