Skip to content

Consider enforcing transportSecurity and supportedHTTPVersions compatibility at compile-time #111

Description

@aryan-25

The transportSecurity and supportedHTTPVersions arguments of NIOHTTPServerConfiguration must be compatible with each other to form a valid configuration. For example, if transportSecurity == .plaintext, then supportedHTTPVersions must not contain .http3.

Currently, we validate the compatibility at runtime, but in #107 (comment), it was discussed that enforcing these checks through the type system would form a better API. In particular, the idea of specifying a separate transport security for each HTTP version was brought up. See the thread for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/usabilityUsability of generated code, ergonomics.status/needs-designNeeds further discussion and a concrete proposal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions