Repository navigation
[PR] fix(relay): skip the #821 null-body warn for HEAD responses - #7420
ranxianglei wants to merge 1 commit into
Conversation
A HEAD response has no body by definition (RFC 9110 §9.3.2), so a 200 HEAD with a null body is normal, not the #821 anomaly. Health probes (e.g. HEAD /api/hello) hit the relay's 2xx null-body branch on every request and flooded bili.log with `[unknown] ← upstream 200 returned a null body` lines — the exact noise in the #7072 report. The relay now skips the warn for HEAD while still warning for a genuine 2xx null body (204/304 on a body-bearing method). No behavior change: the response is still relayed empty for HEAD (the client gets the 200 with no body, as before); only the spurious warn is suppressed.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11121-pr.7420.edb36efThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7420.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — searched open+closed issues and PRs for the null-body / HEAD / #821 fix family: no other PR or issue targets this fix; the only related thread is #7072 (which this PR partially addresses), and no parallel [PR] row in the mirror targets #7072. 标签: bug + p3 + scope/wiring(mirror issue 与 PR #7420 均已打) — 纯日志噪音修复,无功能变更;relay = 协议边界,故 scope/wiring;仅日志刷屏,故 p3。 Verification (branch
|
(ai: vllm-qwen/qwen3.8-27b) CI update: attempt 2 is fully green. All 11 CORE test shards success + all static gates + all e2e lanes — 0 failed, 1 skipped, on head The PR's Nothing further needed from the agent side — ready for human merge. |
What
A 2xx response with a null body logs the #821 warn (
[unknown] ← upstream 200 returned a null body; responding empty to client). For HEAD requests that warn is pure noise: a HEAD response has no body by definition (RFC 9110 §9.3.2), so a 200 HEAD with a null body is normal, not the #821 anomaly.Health probes (e.g.
HEAD /api/hello) hit the relay's 2xx null-body branch on every request and floodbili.logwith that warn line — the exact[unknown]lines in the #7072 report.Fix
The relay's 2xx null-body branch now skips the warn for
HEADwhile still warning for a genuine 2xx null body (204/304 on a body-bearing method).src/server/relay.ts— the#821branch:else→else if (req.method !== "HEAD").No behavior change
The response is still relayed empty for HEAD (the client gets the 200 with no body, exactly as before). Only the spurious warn is suppressed. The #821 warn for a real 2xx null body (204/304) is unchanged.
Test
tests/issue7072-head-null-body.test.ts— both directions:Verified the HEAD test fails on the unpatched code with the exact noise line from the report.
Scope note
This addresses the HEAD-probe noise identified in the #7072 comment. The original question — whether a
POST /v1/messagesthat returns 200 with a null body should be surfaced as a retryable upstream error instead of an empty 200 — is a separate behavior decision and remains open (it needs the reporter's log to confirm whether the 10:14/10:15 warn lines were HEAD probes or real empty Messages, plus a call on the error shape).Related to #7072