cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.28k stars 1.1k forks source link

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

Open jamesmunns opened 3 months ago

jamesmunns commented 3 months ago

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:

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 and explicitly document that pingora only works with UTF-8 paths.