Search responses carry the CMR-Request-Id header twice

Abierto
#2,546 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
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
clojure
Área
api, backend

Línea de trabajo

Reproduce with the two curl calls in the issue against the search collections endpoint, once without and once with a client-supplied CMR-Request-Id. Then trace the search response path that sets CMR-Request-Id, looking for both the default request-ID handling and the client-supplied path adding the header. Done means the response carries exactly one header and the Python requests read returns 'my-request-1' instead of the comma-joined duplicate.

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

Descripción

Every search response carries the CMR-Request-Id header twice, with the same value, including when the client sets the ID itself. The output below is from 2026-11-23.

$ curl -sS -o /dev/null -D - 'https://cmr.earthdata.nasa.gov/search/collections.json?page_size=0' | grep -i '^cmr-request-id'
cmr-request-id: f3f294af-99e3-41dd-abc5-1d83e828f2cf
cmr-request-id: f3f294af-99e3-41dd-abc5-1d83e828f2cf
$ curl -sS -o /dev/null -D - -H 'CMR-Request-Id: my-request-1' 'https://cmr.earthdata.nasa.gov/search/collections.json?page_size=0' | grep -i '^cmr-request-id'
cmr-request-id: my-request-1
cmr-request-id: my-request-1

With requests 2.32.5 installed, a Python client reads the ID back as two IDs, because requests joins a repeated header's values:

$ python3 -c "import requests; r = requests.get('https://cmr.earthdata.nasa.gov/search/collections.json?page_size=0', headers={'CMR-Request-Id': 'my-request-1'}); print(repr(r.headers['CMR-Request-Id']))"
'my-request-1, my-request-1'

Expected: one CMR-Request-Id header, so that the client above reads 'my-request-1'.

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.