Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Range + If-Range support, end-to-end

Abierto
#332 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
go

Línea de trabajo

Comienza con internal/strategy/apiv1.go y internal/cache/api.go; después, inspecciona s3_parallel_get.go y los backends disk, memory, tiered y remote para entender las rutas de lectura existentes. Traza la infraestructura de client/ y remote para el manejo de Range e If-Range. El trabajo estará terminado cuando cada backend devuelva los bytes correctos del rango solicitado con 206 y Content-Range, un If-Range obsoleto devuelva 200 y los rangos no satisfacibles devuelvan 416.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

etag-range-followup

Follow-up from the ETag support assessment (label: etag-range-followup).

The strong content-hash ETag is already a suitable, tier-stable If-Range validator (a range continuation served from a different tier/pod validates correctly; a changed object correctly forces a full 200). The validator value is fine; the surrounding machinery is entirely missing.

Current gaps
  • apiv1.getObject (internal/strategy/apiv1.go) does io.Copy(w, cr) — always 200, never honours Range, never sets Accept-Ranges, never returns 206/Content-Range/416.
  • The cache.Cache interface (internal/cache/api.go) only exposes a whole-object Open returning an io.ReadCloser; there is no partial-read / seek capability. Only the disk backend reader happens to be seekable.
  • checkConditionals does not evaluate If-Range.
Work
  • Add a partial-read capability to the cache interface — either a range-aware open (offset + length) or a documented seekable-reader contract — and implement it for disk, memory, s3 (S3 already does parallel range GETs internally, see s3_parallel_get.go), tiered, and remote.
  • Implement server-side range handling in apiv1.getObject: parse Range, emit Accept-Ranges: bytes, return 206 with Content-Range for satisfiable ranges and 416 for unsatisfiable ones.
  • Evaluate If-Range (against the strong ETag; fall back to full 200 when the validator does not match) before serving a partial response.
  • Plumb Range/If-Range through the client (client/) and remote backend as needed so a tiered remote tier can serve ranges.
Acceptance

Ranged GET against each backend returns the correct bytes with 206/Content-Range; If-Range with a stale ETag returns the full object with 200; unsatisfiable ranges return 416.

Lenguaje dominante
Go
Estrellas
41
Forks
14
Merge medio
19 h 28 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de block/cachew

Todos los issues de block/cachew

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.