cloudflare / cloudflare/pingora

File Paths are often specified as `String`/`str`, and file paths may not be UTF-8

Open
#182 0 comments 0 reactions 1 assignee Claimed by @drcaramelsyrup View on GitHub
enhancement ergonomics
Dominant language
Rust
Stars
27.4k
Forks
1.7k
Avg merge
6h 22m
Merged PRs (30d)
3

Description

In multiple places in the code, `String` or `&str` are used for specifying paths, instead of `OsStr` or `Path` or other similar types.

Examples include:

* `ServerConf` fields `error_log`, `ca_file`
* `Opt` field `conf`
* `Listeners` methods `add_tls` and `add_uds`

In most cases, paths are not required to be valid UTF-8.

It would be good to switch to use the correct types for these interfaces, or use a crate like [`camino`](https://docs.rs/camino/latest/camino/) and explicitly document that `pingora` only works with `UTF-8` paths.

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.