Skip to content

Consider returning [Substring] from HPACKHeaders.subscript(canonicalForm:)  #253

Open
@glbrntt

Description

@glbrntt

Both HTTPHeaders and HPACKHeaders have very similar APIs. One slight difference is that HTTPHeaders subscript(canonicalForm:) returns [Substring] while HPACKHeaders returns [String].

Returning [Substring] would allow us to potentially avoid some heap allocations as well as bringing the API more in line with HTTPHeaders.

We should consider adding an alternative subscript API now or at least changing this in the next major version of NIO HTTP/2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementImprovements to existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions