Http::Status ServerConnectionImpl::dispatch(Buffer::Instance& data) {
  if (runtime_lazy_read_disable_ && active_request_ != nullptr &&
      active_request_->remote_complete_) {
    // Eagerly read disable the connection if the downstream is sending pipelined requests as we
    // serially process them. Reading from the connection will be re-enabled after the active
    // request is completed.
    active_request_->response_encoder_.readDisable(true);
    return okStatus();
  }

  Http::Status status = ConnectionImpl::dispatch(data);

  if (runtime_lazy_read_disable_ && active_request_ != nullptr &&
      active_request_->remote_complete_) {
    // Read disable the connection if the downstream is sending additional data while we are working
    // on an existing request. Reading from the connection will be re-enabled after the active
    // request is completed.
    if (data.length() > 0) {
      active_request_->response_encoder_.readDisable(true);
    }
  }
  return status;
}
Http::Status ServerConnectionImpl::dispatch(Buffer::Instance& data) {
  if (runtime_lazy_read_disable_ && active_request_ != nullptr &&
      active_request_->remote_complete_) {
     
     
     
    active_request_->response_encoder_.readDisable(true);
    return okStatus();
  }

  Http::Status status = ConnectionImpl::dispatch(data);

  if (runtime_lazy_read_disable_ && active_request_ != nullptr &&
      active_request_->remote_complete_) {
     
     
     
    if (data.length() > 0) {
      active_request_->response_encoder_.readDisable(true);
    }
  }
  return status;
}