Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

JSON formatting ignores uppercase and mixed-case Content-Type values

オープン 初心者向け
#1,958 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
cli

調査の方向性

HTTPie の CLI エントリから開始して、issue に記載された JSON formatter を見つけ、その Content-Type の部分文字列チェックを調べます。大文字と小文字が混在する 2 つのレスポンスを再現し、APPLICATION/JSON と Application/Problem+JSON; charset=utf-8 の両方で、コンパクトな JSON ではなく、示されている整形済み出力が生成されることを確認します。

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

説明

JSON response formatting depends on the casing of the Content-Type value. A response with APPLICATION/JSON or Application/Problem+JSON; charset=utf-8 is left compact by http --pretty=format --body URL, while the equivalent lowercase type is formatted.

For a response body {"message":"ok"}, expected output is:

{
    "message": "ok"
}

Actual output retains {"message":"ok"} on one line. Media type names are case-insensitive. The JSON formatter's substring checks currently use the original case.

Reproduced through HTTPie's CLI entry with responses serving these exact content types, against master 5b604c37c6c67e18e7c3e9aee6c88a8c22b98345, Python 3.12.13 / macOS. Both new regressions fail on the original formatter.

Investigated with OpenAI Codex assistance.

主要言語
Python
スター
38.6k
フォーク
4k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

httpie/cli のほかの issue

httpie/cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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