Skip to content

-binメタデータ送信をパディングなしbase64にする - #27

Merged
dkkoma merged 1 commit into
mainfrom
codex/issue-bin-metadata-unpadded-base64
Jul 10, 2026
Merged

-binメタデータ送信をパディングなしbase64にする#27
dkkoma merged 1 commit into
mainfrom
codex/issue-bin-metadata-unpadded-base64

Conversation

@dkkoma

@dkkoma dkkoma commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • docs/issues/open/2026-07-08-bin-metadata-unpadded-base64.md の修正。
  • PROTOCOL-HTTP2 は Binary-Header の base64 を「送信はパディングなし推奨、受信は両方受理必須」と定めるが、現状は php_base64_encode のパディング付き出力をそのまま送出していた。append_custom_request_header_value(src/transport.c)でエンコード後に末尾 = を切り詰める。
  • 受信側は既にパディング有無両対応のため変更なし。

Test plan

  • 新規 tests/phpt/032-bin-metadata-unpadded-base64.phpt: 1/2/3 バイト境界の値(パディング 2/1/0 個)で、GRPC_LITE_TRACE_FILEwire.request_header レコードからワイヤ上の値に = が含まれないことを検証し、fixture サーバーのエコーで round-trip も確認。
  • tools/test/check-phpt.sh: 17/17 PASS。
  • tests/Integration/MetadataCompatibilityTest.php: 4 tests / 18 assertions OK。

🤖 Generated with Claude Code

PROTOCOL-HTTP2はBinary-Headerのbase64について「送信はパディングなしを
推奨」と定めており、公式実装(C-core/grpc-go)もパディングなしで送出する。
append_custom_request_header_valueでphp_base64_encode後に末尾の'='を
切り詰め、1/2/3バイト境界のワイヤ値をトレースで検証するphptを追加。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dkkoma
dkkoma merged commit 68c4010 into main Jul 10, 2026
4 checks passed
dkkoma added a commit that referenced this pull request Jul 14, 2026
- PR #26/#27/#28/#29 でマージ済みの issue(goaway transparent retry / bin metadata unpadded base64 / status taxonomy / encoding flag=0 / deadline RST_STREAM)を Status: Closed にして docs/issues/closed/ へ移動
- PR #29 レビューサイクル(pass 4〜11)の記録 30 ファイルを docs/reviews/issues/ に追加

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants