Skip to content

メンテナンス画面のHTTPヘッダーのバージョン表記を実際のプロトコルに合わせる#6629

Open
kurozumi wants to merge 1 commit intoEC-CUBE:4.3from
kurozumi:issue/6407-http-protocol-header
Open

メンテナンス画面のHTTPヘッダーのバージョン表記を実際のプロトコルに合わせる#6629
kurozumi wants to merge 1 commit intoEC-CUBE:4.3from
kurozumi:issue/6407-http-protocol-header

Conversation

@kurozumi
Copy link
Contributor

@kurozumi kurozumi commented Feb 16, 2026

概要

メンテナンス画面表示時のHTTPレスポンスヘッダーで、HTTPバージョンがHTTP/1.1にハードコードされていたため、実際のプロトコルバージョン(HTTP/2, HTTP/3等)を反映するように修正しました。

再現手順

  1. HTTP/2またはHTTP/3環境でEC-CUBEを動作させる
  2. メンテナンスモードを有効化(.maintenanceファイル作成)
  3. フロント画面にアクセス
  4. レスポンスヘッダーを確認するとHTTP/1.1 503となっている

原因

index.phpの75行目でheader('HTTP/1.1 503 Service Temporarily Unavailable');とHTTPバージョンがハードコードされていた。

修正内容

http_response_code(503)を使用することで、PHPが自動的に実際のHTTPプロトコルバージョンを使用するように変更。

検証方法

  1. メンテナンスモードを有効化
  2. フロント画面にアクセス
  3. レスポンスヘッダーでHTTPステータスコード503が返却されることを確認
  4. HTTPプロトコルバージョンが実際の接続に応じたものになっていることを確認

影響範囲

  • index.phpのメンテナンス画面表示処理のみ

互換性

破壊的変更なし。動作に影響はなく、レスポンスヘッダーのプロトコル表記が正確になるのみ。

fixes #6407

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • バグ修正
    • メンテナンスモード中のHTTPステータス通知方法を改善しました。サーバーがメンテナンス状態をより正確にブラウザやプロキシに通知するようになります。

HTTPバージョンがHTTP/1.1にハードコードされていたため、
http_response_code()を使用して実際のプロトコルバージョンを反映するように修正

fixes EC-CUBE#6407

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

メンテナンスモード時のHTTPステータスコード設定方法を変更。header()関数の直接呼び出しからhttp_response_code()関数への置き換えで、実際に使用されているHTTPプロトコルバージョンに対応した応答ヘッダーを返すように改善。

Changes

Cohort / File(s) Summary
メンテナンスモード応答処理
index.php
メンテナンス時のHTTPステータスコード503の設定をヘッダー関数からhttp_response_code()に変更。実際のプロトコルバージョンに自動対応。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 ✨
メンテナンスの画面映れば
HTTPのバージョン揃い
きちんと正しく応答して
ユーザーもサーバーも笑顔に 🌙

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR タイトルは、メンテナンス画面のHTTPヘッダープロトコル表記を実際のプロトコルに合わせるという主要な変更内容を正確に反映しており、明確で具体的です。
Linked Issues check ✅ Passed 変更内容は issue #6407 で要求されたHTTPプロトコル表記の改善を完全に実装しており、http_response_code(503) による実装は提案されていたアプローチの一つと一致しています。
Out of Scope Changes check ✅ Passed すべての変更は index.php のメンテナンス画面処理のみに限定されており、issue #6407 の要件に直接関連しており、スコープ外の変更は存在しません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into 4.3

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (37c5250) to head (458f4f2).
⚠️ Report is 1 commits behind head on 4.3.

Additional details and impacted files
@@             Coverage Diff              @@
##                4.3    #6629      +/-   ##
============================================
- Coverage     78.84%   78.83%   -0.02%     
  Complexity     6631     6631              
============================================
  Files           475      475              
  Lines         26539    26539              
============================================
- Hits          20924    20921       -3     
- Misses         5615     5618       +3     
Flag Coverage Δ
Unit 78.83% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

メンテナンス画面のときのHTTPヘッダーのバージョン表記を実際のものにする

1 participant