Skip to content

Fix stale response headers in serve_content - #165

Open
mk78 wants to merge 1 commit into
pytest-dev:mainfrom
mk78:mk78-investigate-small-bug
Open

mk78 wants to merge 1 commit into
pytest-dev:mainfrom
mk78:mk78-investigate-small-bug

Conversation

@mk78

@mk78 mk78 commented Dec 4, 2026

Copy link
Copy Markdown

Summary

Fix stale custom response headers when calling serve_content() repeatedly.

Previously, passing headers=None or headers={} retained custom headers from the previous response. Each call now replaces the previous custom-header configuration, preventing unintended header leakage.

Tests

  • Regression tests: 2 passed
  • Full suite: 71 passed
  • Pre-commit checks: passed, excluding the Docker-based actionlint hook unavailable locally
  • git diff --check: passed

AI assistance

Microsoft Copilot assisted with implementation and testing. I reviewed the changes and take responsibility for this contribution.

Assisted-by: Microsoft Copilot
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@diazona

diazona commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! I'm a little busy right now but I'll review this over the weekend.

This branch has not been deployed

No deployments
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