actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

remove http::Uri from public api

Open fafhrd91 opened this issue 6 years ago • 7 comments

http::Uri is fine for transport layer, but it is pretty crappy as public api

fafhrd91 avatar Apr 13 '18 18:04 fafhrd91

Do you intend to replace it with something? We still need some Uri manipulation options, even crappy http:Uri is fine

DoumanAsh avatar Apr 13 '18 20:04 DoumanAsh

we have to replace it with something.

fafhrd91 avatar Apr 13 '18 20:04 fafhrd91

i started work on new functionality.

@DoumanAsh i am going to deprecate .uri_mut(), you can not modify uri for path normalization, routing happens before any middleware get called.

for normalizatin we need to come up with different approach. i am thinking about sub-request.

fafhrd91 avatar Apr 17 '18 19:04 fafhrd91

Some way to get the full URL from a request would definitely be useful.

kamek-pf avatar Sep 21 '18 19:09 kamek-pf

@fafhrd91 Do we still want to remove http::Uri from publci API?

DoumanAsh avatar Nov 23 '18 12:11 DoumanAsh

We need replacement first

fafhrd91 avatar Nov 23 '18 17:11 fafhrd91

BTW, WHATWG recommends using the term URL, because the new spec has unified or replaced the old theoretical flavors of {U,I}R{I,L}s.

https://url.spec.whatwg.org/#goals

So while you're changing it, I recommend switching to the name URL. It may even help with the transition.

And there's the url crate based on the current standard.

kornelski avatar Apr 13 '19 19:04 kornelski