Search responses carry the CMR-Request-Id header twice

オープン
#2,546 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
clojure
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Clojure
スター
403
フォーク
111
平均マージ
2日 4時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nasa/Common-Metadata-Repository のほかの issue

nasa/Common-Metadata-Repository の issue をすべて見る

似ている issue

Clojure の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。