headers
headers copied to clipboard
Add `impl From<Uri> for Location` + accessor
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
I addressed both comments, thanks for the feedback!
Can someone review this? I needed it today and had to use a workaround.
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?