cloudflare / cloudflare/pingora
File Paths are often specified as `String`/`str`, and file paths may not be UTF-8
Open
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
Assessment
This issue has not been assessed yet.