Search responses carry the CMR-Request-Id header twice

Aperta
#2,546 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
clojure
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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'.

Lingua principale
Clojure
Stelle
403
Fork
111
Merge medio
2g 4h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nasa/Common-Metadata-Repository

Tutte le issue di nasa/Common-Metadata-Repository

Issue simili

Altre issue su Clojure

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.