code: private WriteFuture writeHttpResponse(NextFilter nextFilter, IoSession session, HttpRequestMessage httpRequest, final HttpStatus httpStatus, final String reason) {
          HttpResponseMessage httpResponse = new HttpResponseMessage();
          httpResponse.setVersion(httpRequest.getVersion());
          httpResponse.setStatus(httpStatus);
          if (reason != null) {
              httpResponse.setReason(reason);
          }
          final DefaultWriteFutureEx future = new DefaultWriteFutureEx(session);
          nextFilter.filterWrite(session, new DefaultWriteRequestEx(httpResponse, future));
          return future;
      }
docs: Write a fresh HttpResponse from this filter down the filter chain, based on the provided request, with the specified http status code.
  
  @param nextFilter  the next filter in the chain
  @param session     the IO session
  @param httpRequest the request that the response corresponds to
  @param httpStatus  the desired status of the http response
  @param reason      the reason description (optional)
  @return  a write future for the response written