Skip to content

Request with HttpVersion > 3 and RequestVersionOrHigher policy sent as H/3 request #72185

Description

@greenEkatherine

Description

Request message with HttpVersion higher than currently supported 3.0 is not checked on the HttpVersionPolicy. In case when it is set to RequestVersionOrHigher we get unexpected behavior -- request is treated as H/3 request.

Reproduction Steps

var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri)
{
    Version = new Version(4, 0),
    VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher
};

Expected behavior

Throw request version cannot establish

Actual behavior

No exception from HttpConnection pool and sent via H/3 connection

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.Httpbughelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions