Repository navigation
[Core] Honour Expect: 100-continue in the Netty HTTP Client - #50760
Merged
Isabelle (ibrandes) merged 7 commits intoOct 18, 2026
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 34 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is narrowly scoped, preserves body-sending behavior, and includes adequate sync and async coverage.
0 open findings
What changed in this PR
Adds opt-in reporting of interim HTTP 100 Continue responses in the Netty transport.
Changes:
- Propagates an
AtomicBooleanobservation holder through request context. - Detects exact
100 Continueresponses in the Netty handler. - Adds sync/async tests and release notes.
| File | Description |
|---|---|
NettyAsyncHttpClient.java |
Extracts and propagates the observation holder. |
AzureSdkHandler.java |
Records interim 100 Continue responses. |
AzureNettyHttpClientContext.java |
Carries the per-request holder. |
NettyExpectContinueObservationTests.java |
Tests positive and negative observation paths. |
CHANGELOG.md |
Documents the opt-in behavior. |
🧠 Review effort: Balanced
Isabelle (ibrandes)
marked this pull request as ready for review
October 15, 2026 20:28
Isabelle (ibrandes)
requested review from
a team,
Jonathan Giles (JonathanGiles),
Alan Zimmer (alzimmermsft) and
vcolin7
as code owners
October 15, 2026 20:28
Alan Zimmer (alzimmermsft)
approved these changes
Oct 15, 2026
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Core PRs:
#50312
#50311
Related Storage PRs:
#50094
Summary
Adds opt-in support for the Netty HTTP client to observe the
Expect: 100-continuehandshake and surface it to callers. When a caller places anAtomicBooleanin the requestContextunder the keyazure-http-client-expect-continue-received, the client sets it totrueif the service answers with an interim100 Continueresponse. This does not change how or when the request body is sent.Why
This is the
azure-core-http-nettypiece of the broaderExpect: 100-continueeffort for Storage (see #50094). In that design, the behavior lives in the pipeline-policy layer, which applies theExpect: 100-continueheader and installs an observation holder in the requestContext; the HTTP client's only responsibility is to report whether the interim100 Continuewas actually received so the policy can act/log on it.The approach deliberately differs from the vertx client:
sendHead()+continueHandler()+ fallback timer) because it otherwise sends headers and body together.100 Continueon the wire and fuses headers+body for in-memory bodies, so manual withholding is infeasible and unnecessary. The only gap was surfacing the observation — which is what this change does.Changes
NettyAsyncHttpClient— reads the opt-inAtomicBooleanfrom the requestContextand threads it throughattemptAsync(including proxy-retry paths) into the per-request context. The context is still attached only when needed (response-timeout override, progress reporter, or the new holder).AzureNettyHttpClientContext— carries the optional caller-provided observation holder.AzureSdkHandler— inchannelRead, sets the holder totruewhen it observes an interim response scoped exactly to status100, before reactor-netty consumes it. Body sending is untouched.NettyExpectContinueObservationTests— new test using a minimal raw HTTP/1.1 server; covers continue / no-continue × sync / async.CHANGELOG.md— Features Added entry under1.17.0-beta.1.