Skip to content

Conversation

sbiscigl
Copy link
Contributor

@sbiscigl sbiscigl commented Oct 8, 2025

Description of changes:

We accidentally changed the behavior of the DataReceivedEventHandler callback in #2954 for the windows http client. When we changed to buffer the input in StreamBufProtectedWriter, when we call the DataReceivedEventHandler in the writer function, the response body has not been updated yet, it is still in the temp buffer in the wrapper object. This causes the callback to see no data in the response stream.

This updates the code to work as it worked before by adding a WriteCompleteCallback in StreamBufProtectedWriter that can be called after the response buffer has been written to.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sbiscigl sbiscigl force-pushed the stream-buf-protected-write-callback branch from c0febb1 to 458c326 Compare October 8, 2025 21:31
@sbiscigl sbiscigl changed the title Fix data recieved handler for winhttp Fix data received handler for winhttp Oct 8, 2025
@sbiscigl sbiscigl force-pushed the stream-buf-protected-write-callback branch from 458c326 to 993f194 Compare October 13, 2025 18:50
@sbiscigl sbiscigl marked this pull request as ready for review October 13, 2025 18:50
@sbiscigl sbiscigl force-pushed the stream-buf-protected-write-callback branch 8 times, most recently from 0b2df59 to d11b3be Compare October 14, 2025 16:50
@sbiscigl sbiscigl force-pushed the stream-buf-protected-write-callback branch from d11b3be to 004b7d6 Compare October 14, 2025 19:50
@sbiscigl sbiscigl merged commit 52f21c3 into main Oct 14, 2025
5 of 6 checks passed
@sbiscigl sbiscigl deleted the stream-buf-protected-write-callback branch October 14, 2025 21:14
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.

3 participants