ConnStateData::tunnelOnError(const HttpRequestMethod &method, const err_type requestError)
{
    if (!Config.accessList.on_unsupported_protocol) {
        debugs(33, 5, "disabled; send error: " << requestError);
        return false;
    }

    if (!preservingClientData_) {
        debugs(33, 3, "may have forgotten client data; send error: " << requestError);
        return false;
    }

    const auto context = pipeline.front();
    const auto http = context ? context->http : nullptr;
    const auto request = http ? http->request : nullptr;

    ACLFilledChecklist checklist(Config.accessList.on_unsupported_protocol, request, nullptr);
    checklist.al = http ? http->al : nullptr;
    checklist.requestErrorType = requestError;
    checklist.src_addr = clientConnection->remote;
    checklist.my_addr = clientConnection->local;
    checklist.conn(this);
    const char *log_uri = http ? http->log_uri : nullptr;
    checklist.syncAle(request, log_uri);
    auto answer = checklist.fastCheck();
    if (answer.allowed() && answer.kind == 1) {
        debugs(33, 3, "Request will be tunneled to server");
        if (context)
            context->finished(); // Will remove from pipeline queue
        Comm::SetSelect(clientConnection->fd, COMM_SELECT_READ, NULL, NULL, 0);
        return initiateTunneledRequest(request, Http::METHOD_NONE, "unknown-protocol", preservedClientData);
    }
    debugs(33, 3, "denied; send error: " << requestError);
    return false;
}
ConnStateData::tunnelOnError(const HttpRequestMethod &method, const err_type requestError)
{
    if (!Config.accessList.on_unsupported_protocol) {
        debugs(33, 5, "disabled; send error: " << requestError);
        return false;
    }

    if (!preservingClientData_) {
        debugs(33, 3, "may have forgotten client data; send error: " << requestError);
        return false;
    }

    const auto context = pipeline.front();
    const auto http = context ? context->http : nullptr;
    const auto request = http ? http->request : nullptr;

    ACLFilledChecklist checklist(Config.accessList.on_unsupported_protocol, request, nullptr);
    checklist.al = http ? http->al : nullptr;
    checklist.requestErrorType = requestError;
    checklist.src_addr = clientConnection->remote;
    checklist.my_addr = clientConnection->local;
    checklist.conn(this);
    const char *log_uri = http ? http->log_uri : nullptr;
    checklist.syncAle(request, log_uri);
    auto answer = checklist.fastCheck();
    if (answer.allowed() && answer.kind == 1) {
        debugs(33, 3, "Request will be tunneled to server");
        if (context)
            context->finished();  
        Comm::SetSelect(clientConnection->fd, COMM_SELECT_READ, NULL, NULL, 0);
        return initiateTunneledRequest(request, Http::METHOD_NONE, "unknown-protocol", preservedClientData);
    }
    debugs(33, 3, "denied; send error: " << requestError);
    return false;
}