code: HttpServerExchange startResponse() throws IllegalStateException {
          int oldVal = state;
          if (allAreSet(oldVal, FLAG_RESPONSE_SENT)) {
              throw UndertowMessages.MESSAGES.responseAlreadyStarted();
          }
          this.state = oldVal | FLAG_RESPONSE_SENT;
  
          log.tracef("Starting to write response for %s", this);
          return this;
      }
docs: Transmit the response headers. After this method successfully returns,
  the response channel may become writable.
  <p>
  If this method fails the request and response channels will be closed.
  <p>
  This method runs asynchronously. If the channel is writable it will
  attempt to write as much of the response header as possible, and then
  queue the rest in a listener and return.
  <p>
  If future handlers in the chain attempt to write before this is finished
  XNIO will just magically sort it out so it works. This is not actually
  implemented yet, so we just terminate the connection straight away at
  the moment.
  <p>
  TODO: make this work properly
  
  @throws IllegalStateException if the response headers were already sent