code: @Override
      protected void filterWriteHttpResponse(NextFilter nextFilter, final IoSessionEx session, WriteRequest writeRequest,
              final HttpResponseMessage httpResponse) throws Exception {
  
          if ( session instanceof BridgeSession ) {
              writeRequest.getFuture().addListener(new IoFutureListener<IoFuture>() {
                  @Override
                  public void operationComplete(IoFuture future) {
                      if (httpResponse.getStatus() != HttpStatus.CLIENT_UNAUTHORIZED) {
                          DRAFT76_KEY3_BUFFER_KEY.remove(session);
                          removeFilter(session.getFilterChain(), HttpMergeRequestFilter.this);
                          if ( loggerEnabled()) {
                              logger.trace(String.format("HttpMergeRequestFilter: response complete; removed merge request filter from session '%s'.", session));
                          }
                      } else {
                          if ( loggerEnabled()) {
                              logger.trace(String.format("HttpMergeRequestFilter: 401 response written to session '%s'.", session));
                          }
                      }
                  }
              });
          }
  
          super.filterWriteHttpResponse(nextFilter, session, writeRequest, httpResponse);
      }
docs: Clean up ourselves from the filter chain after we have written a non-401 extended response.
  A 401-coded extended response means that the extended handshake is still ongoing (state "EXTENDED_RESPONSE_WRITTEN").
  A non-401-coded extended response means that the extended handshake is complete (state "EXTENDED_RESPONSE_COMPLETE").
  
  @param nextFilter   the next filter
  @param session      the IO session
  @param writeRequest the write request
  @throws Exception when a problem occurs