Ejemplo n.º 1
0
        protected override void ClearFast()
        {
            if (!ReuseHeaderValues)
            {
                // If we aren't reusing headers clear them all
                Clear(_bits);
            }
            else
            {
                // If we are reusing headers, store the currently set headers for comparison later
                _previousBits = _bits;
            }

            // Mark no headers as currently in use
            _bits = 0;
            // Clear ContentLength and any unknown headers as we will never reuse them
            _contentLength = null;
            MaybeUnknown?.Clear();
        }
Ejemplo n.º 2
0
    protected override void ClearFast()
    {
        if (!ReuseHeaderValues)
        {
            // If we aren't reusing headers clear them all
            Clear(_bits | _pseudoBits);
        }
        else
        {
            // If we are reusing headers, store the currently set headers for comparison later
            // Pseudo header bits were cleared at the start of a request to hide from the user.
            // Keep those values for reuse.
            _previousBits = _bits | _pseudoBits;
        }

        // Mark no headers as currently in use
        _bits       = 0;
        _pseudoBits = 0;
        // Clear ContentLength and any unknown headers as we will never reuse them
        _contentLength = null;
        MaybeUnknown?.Clear();
        _enumeratorCache?.Reset();
    }