Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

fix(api): Don't send multiple responses for one request#21651

Merged
harshavardhana merged 1 commit intominio:masterfrom
mjs:fix-double-resp
Oct 24, 2025
Merged

fix(api): Don't send multiple responses for one request#21651
harshavardhana merged 1 commit intominio:masterfrom
mjs:fix-double-resp

Conversation

@mjs
Copy link
Contributor

@mjs mjs commented Oct 21, 2025

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

This change introduces a ResponseWriter which tracks whether a response has already been sent. This is used to prevent a response being sent if something already has (e.g. by a preconditions check function).

Motivation and Context

In some cases multiple responses are being sent for one request, causing the API server to incorrectly drop connections.
Fixes #21633.

How to test this PR?

See the reproduction steps in #21633. This issue no longer reproducible with this change in place.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

In some cases multiple responses are being sent for one request, causing
the API server to incorrectly drop connections.

This change introduces a ResponseWriter which tracks whether a
response has already been sent. This is used to prevent a response being
sent if something already has (e.g. by a preconditions check function).

Fixes minio#21633.
@mjs mjs changed the title fix(api): Don't send responses twice. fix(api): Don't send responses twice Oct 21, 2025
@mjs mjs changed the title fix(api): Don't send responses twice fix(api): Don't send multiple responses for one request Oct 21, 2025
@harshavardhana harshavardhana merged commit 52eee5a into minio:master Oct 24, 2025
18 of 21 checks passed
@mjs mjs deleted the fix-double-resp branch October 25, 2025 00:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MinIO API server incorrectly closes connections causing cascading replication issues

2 participants