Comments (5)
Would that be file:///
plus the bytes that remain with \
replaced with /
and URL encoded?
Put another way—given that the path is not necessarily legal UTF-16, what do we do for non-ASCII paths?
from rust-url.
Fixed in 36d22de. The reason this was not implemented is that std::path::windows::Path
is relatively complex (see PathPrefix
in particular), and I don’t know what to do with UNC and other prefixes other than disk. For now they just return Err
.
from rust-url.
@chris-morgan It’s unclear to me whether windows filenames are necessarily legal UTF-16. But since std::path::windows::Path
uses an UTF-8 String
internally, this is already an issue in libstd. rust-url just uses the bytes returned by Path::components
and percent-encodes that.
from rust-url.
And, Url::to_file_path
was similarly fixed in 286c8f7.
from rust-url.
Thanks @SimonSapin!
from rust-url.
Related Issues (20)
- Ensure URL roundtrips for opaque paths
- set scheme with non-tab/newline C0 controls should result in no-op
- Origin port as an `Option<u16>`
- percent ("%) character must be percent-encoded as "%25" HOT 1
- Optional API to convert to http::Uri HOT 3
- Wrongly resolves ip to domain. HOT 2
- feature request: more complicated percent-encoding rules HOT 2
- feature: expose pathname publicly HOT 3
- Please add an option to not remove wellknown default ports from URL HOT 1
- Feature Proposal: Builder for Constructing New URL Instances from Parts HOT 2
- The program crashed after using the "join" function.
- Program Crash in fuzzing (assert failed in parse_path)
- `set_port`, `set_username` & `set_password` should check for a value before returning `Err(())` HOT 7
- Shouldn't `Host` be lowercase by default?
- URL pathname and search setter incorrectly strips trailing spaces
- Roadmap HOT 1
- Stabilize `debugger_visualizer` feature
- InvalidPort is returned for URLs with a '#' HOT 1
- Fix `serde::Deserialize` impl for `Url` prints confusing error message
- Feature request: Provide customary RFC 3986 encoding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-url.