Skip to content

Disable Expect 100-Continue by default in Apache 5 HTTP client#6828

Merged
alextwoods merged 4 commits intomasterfrom
alexwoo/apache5-100-continue
Apr 1, 2026
Merged

Disable Expect 100-Continue by default in Apache 5 HTTP client#6828
alextwoods merged 4 commits intomasterfrom
alexwoo/apache5-100-continue

Conversation

@alextwoods
Copy link
Copy Markdown
Contributor

@alextwoods alextwoods commented Mar 30, 2026

Disable Expect 100-Continue by default in Apache 5 HTTP client

Motivation and Context

Switch the default expectContinue from enabled to disabled in the new Apache 5 HTTP client. The Apache5 HTTP client applies Expect 100-Continue to all PUT requests with bodies. For non streaming cases (or for small streaming uploads) this is inefficient and results in multiple round trips.

S3 PutObject and UploadPart will still get expect-100 continue through the S3 Client.

Modifications

  • Change default expectContinue from true to false.

Testing

Unit tests + manual testing.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ x New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.

License

  • I confirm that this pull request can be released under the Apache 2 license

@alextwoods alextwoods added no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required perf-improvement Label for PRs that contain performance improvement changes. labels Mar 30, 2026
@alextwoods alextwoods marked this pull request as ready for review March 30, 2026 20:15
@alextwoods alextwoods requested a review from a team as a code owner March 30, 2026 20:15
@alextwoods alextwoods enabled auto-merge March 31, 2026 15:14
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@alextwoods alextwoods added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit 22c9410 Apr 1, 2026
39 of 41 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2026
@alextwoods alextwoods deleted the alexwoo/apache5-100-continue branch April 2, 2026 15:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required perf-improvement Label for PRs that contain performance improvement changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants