Skip to content

HEAD requests to streaming routes return the full body (HEAD handled only on sync path) #28

Description

@thinkter

Summary

HEAD requests to streaming routes return the full body (server.ts:334-343 handles HEAD only on the sync path).

Impact

A HEAD probe against a streaming route returns the full body instead of just headers, defeating the point of HEAD and wasting bandwidth (and breaking any client/monitor that expects HEAD to be cheap).

Evidence

  • src/server.ts:334-343 — HEAD handling covers only the sync render path

Suggested fix

Short-circuit HEAD on the streaming path too: run the route match (for status/headers), but don't flush the body. Reuse the same HEAD handler across both paths.

From the AUDIT.md "Low-hanging" list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: streamingrenderPipelineStreaming / progressive enhancement under streamsbugSomething isn't workingseverity: low-hangingPolish, tech debt, missing docs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions