Skip to content

fix(web): preserve Content-Length for HEAD requests on the index - #308

Merged
pitill0 merged 1 commit into
mainfrom
fix/web-index-head-content-length
Oct 29, 2026
Merged

pitill0 merged 1 commit into
mainfrom
fix/web-index-head-content-length

Conversation

@pitill0

@pitill0 pitill0 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

Fix incorrect Content-Length: 0 responses for HEAD / in FluxTuner Web.

The index endpoint now reports the size of the corresponding GET representation while continuing to return an empty body for HEAD requests.

Changes

  • Explicitly set Content-Length for successful HEAD responses.
  • Preserve identity and gzip response representations.
  • Maintain existing ETags, Vary: Accept-Encoding, and cache behavior.
  • Preserve conditional HEAD responses (304 Not Modified) without a body or Content-Length.
  • Add parametrized regression tests covering both legacy and versioned static asset modes.

Validation

Final pre-PR gate: PASS

  • Ruff lint and format: passed.
  • Mypy: passed (117 source files).
  • Bandit: no issues identified.
  • pip-audit: no known vulnerabilities in audited dependencies.
  • JavaScript syntax: 40 files passed.
  • pytest: 1,873 passed, 8 skipped.
  • Wheel and sdist: built and verified.
  • Git working tree: clean.

Scope

This PR fixes the HTTP HEAD contract only. It does not change static asset publication, caching policies, favicon resources, or JavaScript loading behavior.

No production deployment or configuration changes are included.

@pitill0 pitill0 self-assigned this Oct 29, 2026
@pitill0 pitill0 added the bug Something isn't working label Oct 29, 2026
@pitill0
pitill0 merged commit 816bc13 into main Oct 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant