Range header issues
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- rust
- Área
- networking
Línea de trabajo
Start with the Range header implementation and its Range::bytes and satisfiable_ranges entry points. Review the proposed ByteRangeSpec representation, iterator construction, collection-backed storage, and unknown-resource-size behavior; done means all four listed issues are addressed consistently.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The Range header is one of the least useful header types in this library. Most of these problems stem from the fact that it contains only a string HeaderValue, instead of a parsed representation of the Range.
-
The internal representation of range endpoints passed to
bytesand returned fromsatisfiable_rangesisBound<u64>. But this is a very poor fit, because it suggests in the return type thatBound::Excludedwould be a valid value to use in aRangeheader, when it is actually never possible for it to appear.headersshould re-introduce theByteRangeSpecenum to encode the three valid cases for theRangeheader. -
Range::bytesallows construction from a singleimpl RangeBounds<u64>.Rangeshould be extended to allow construction fromimpl Iterator<ByteRangeSpec>. -
The internal representation of a
Rangeis a string cloned from theHeaderValuepassed todecode. It should instead be a collection ofByteRanges, perhaps aSmallVec<[ByteRangeSpec; 1]>since the expected case is that there will only be one range (multipart ranges are generally uncommon).If you are constructing or parsing this header, it is expected that you are going to access the fields, so the extra memory overhead of doing so is explicitly necessary. And the type already clones the string header value! Doing the SmallVec optimization would reduce the number of allocations by 1 for the typical case.
-
satisfiable_rangesassumes the caller will know the size of the resource being fetched. It may not, in which case passingu64::MAXwill return nonsense results when a suffix range is parsed.
- Lenguaje dominante
- Rust
- Estrellas
- 200
- Forks
- 108
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperium/headers
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Range::bytes and ContentRange::bytes do unchecked u64 arithmetic on boundsPosiblemente ocupada @youdie006 la tomó hace 57 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
-
From<SystemTime> for HttpDate panics on times before 1970 or after year 9999Posiblemente ocupada @SAY-5 la tomó hace 76 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Link supportAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
Todos los issues de hyperium/headers
Issues similares
-
XmlFragment children, successors and siblings stop at the first child that is not an XML typeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
repowise-dev/repowise#3374 ·
Los mantenedores suelen responder en 1 día
-
awaiting-response bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wildcard/caro#1562 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
objectionary/sodg.rs#301 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
HakanSeven12/OpenCADStudio#1706 · 1 comentario ·
Los mantenedores suelen responder en 1 día