headers icon indicating copy to clipboard operation
headers copied to clipboard

Add `impl From<Uri> for Location` + accessor

Open fasterthanlime opened this issue 2 years ago • 3 comments

As far as I know, all URI characters should be valid Header value characters, so we can have an infallible constructor for Location from an Uri.

This doesn't cover all uses of the Location header, since it allows URI-references like /People.html#tim, but it's an ergonomic win already, as mentioned in https://github.com/hyperium/headers/issues/48

fasterthanlime avatar Mar 15 '22 13:03 fasterthanlime

I addressed both comments, thanks for the feedback!

fasterthanlime avatar Mar 15 '22 14:03 fasterthanlime

Can someone review this? I needed it today and had to use a workaround.

programmerjake avatar Jun 21 '22 07:06 programmerjake

Another gentle and friendly nudge - I've run up against this one too, and I'm trying to avoid a temporary fork! Absolutely understand pressures of time etc. on maintainers, I've been there! If there's something that others could help with, some of us might be able to step up?

kolektiv avatar Jul 05 '23 12:07 kolektiv