Ejemplo n.º 1
0
    // Compare to Http1Connection.OnStartLine
    protected override bool TryParseRequest(ReadResult result, out bool endConnection)
    {
        // We don't need any of the parameters because we don't implement BeginRead to actually
        // do the reading from a pipeline, nor do we use endConnection to report connection-level errors.
        endConnection = !TryValidatePseudoHeaders();

        // Suppress pseudo headers from the public headers collection.
        HttpRequestHeaders.ClearPseudoRequestHeaders();

        // Cookies should be merged into a single string separated by "; "
        // https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.5
        HttpRequestHeaders.MergeCookies();

        return(true);
    }