Skip to content

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

Open
alextwoods wants to merge 3 commits intomasterfrom
alexwoo/apache5-100-continue
Open

Disable Expect 100-Continue by default in Apache 5 HTTP client#6828
alextwoods wants to merge 3 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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