http-rs / http-rs/http-types

Use `ascii` crate for string values inside `HeaderValue`, `HeaderName` types

Open
#313 8 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Rust
Stars
209
Forks
91
PR merge metrics
No merged PRs in 30d

Description

We could remove almost every instance of `unsafe` in our codebase by replacing the use of `String` in `HeaderName` and `HeaderValue` with [`ascii::AsciiString`](https://docs.rs/ascii/1.0.0/ascii/) instead. Implementing this shouldn't be too hard, but code-wise it's a fair few lines that need changing.

This wouldn't change anything in our API signatures either, assuming we don't have any bugs in how we handle ASCII today. @brightly-salty would you be interested in perhaps trying to tackle this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.