UMM JSON search responses are not gzipped when the request accepts gzip

Abierto
#2,545 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
clojure
Área
api, backend

Línea de trabajo

Reproduce both curl requests from the issue and compare the content-encoding headers for .json and .umm_json. Start by locating the response-compression middleware used by the search routes and the content-type allowlist that covers application/json but appears not to cover the UMM JSON media type. Check the search/middleware tests for response-header assertions; done means .umm_json returns content-encoding: gzip when accepted, while existing JSON behavior and uncompressed requests stay unchanged.

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

Descripción

A granule search returned as UMM JSON is not compressed when the request sends Accept-Encoding: gzip, although the same search returned as JSON is. The output below is from 2026-11-23.

$ curl -sS -o /dev/null -D - -H 'Accept-Encoding: gzip' 'https://cmr.earthdata.nasa.gov/search/granules.json?collection_concept_id=C2076104650-LPCLOUD&page_size=100' | grep -i -E '^content-(type|encoding|length)'
content-type: application/json;charset=utf-8
content-encoding: gzip
$ curl -sS -o /dev/null -D - -H 'Accept-Encoding: gzip' 'https://cmr.earthdata.nasa.gov/search/granules.umm_json?collection_concept_id=C2076104650-LPCLOUD&page_size=100' | grep -i -E '^content-(type|encoding|length)'
content-type: application/vnd.nasa.cmr.umm_results+json;version=1.6.7; charset=utf-8
content-length: 1133709

The 1,133,709-byte UMM JSON body compresses to 29,843 bytes with gzip:

$ curl -sS 'https://cmr.earthdata.nasa.gov/search/granules.umm_json?collection_concept_id=C2076104650-LPCLOUD&page_size=100' | gzip | wc -c
   29843

Expected: a UMM JSON response is gzipped when the request accepts gzip, as a JSON response is.

Lenguaje dominante
Clojure
Estrellas
403
Forks
111
Merge medio
2 d 4 h
PR fusionados (30 d)
13

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 nasa/Common-Metadata-Repository

Todos los issues de nasa/Common-Metadata-Repository

Issues similares

Más issues de Clojure

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.