hyperium / headers

Typed HTTP Headers from hyper
https://hyper.rs
MIT License
162 stars 84 forks source link

make Range headers strongly typed (again) #93

Closed jcgruenhage closed 9 months ago

jcgruenhage commented 2 years ago

fixes #87

I'm very much not happy with it as it is right now, but this is what I've been able to hack together so far. I'm still posting it as a starting point for further work on this, and to be able to point out the points I'm unsure of.

Current state of the PR: https://github.com/hyperium/headers/pull/93#pullrequestreview-782268136

seanmonstar commented 9 months ago

Apologies for taking so long, part of the problem was the API breakage in this change. I've opened #155 as an alternative now that a breaking change is possible, but went that direction because it's more conservative. It just fixes what was broken, without added much new surface area to express everything in the spec.

I'm hoping to start with the immediate fix, and if there's desire to construct or parse much more complicated Range headers, we can file an issue with a proposal that doesn't use as many public enums (I know they were there originally, this crate learned they are API compatibility hazards).