Skip to content

Should web_sys::Headers allow opaque bytes? #1287

Open
@liamcurry

Description

@liamcurry

I'm writing some code to convert an http::Request to a web_sys::Request, and I noticed in the http crate there is a struct HeaderValue with this note:

In practice, HTTP header field values are usually valid ASCII. However, the HTTP spec allows for a header value to contain opaque bytes as well. In this case, the header field value is not able to be represented as a string.

The functions for web_sys::Headers don't take this into account and all rely on strings. Would that be considered a bug? If not then please feel welcome to close this issue. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeTracking breaking changes for the next major version bump (if ever)frontend:webidlIssues related to the WebIDL frontend to wasm-bindgenweb-sysIssues related to the `web-sys` crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions