Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HttpRequest Body Being Consumed and Sending an Empty Request Body #14915

Merged
merged 2 commits into from
Sep 8, 2020

Conversation

alzimmermsft
Copy link
Member

@alzimmermsft alzimmermsft commented Sep 8, 2020

This PR resolves a bug where pipeline operations, such as authorization handling, would consume the HttpRequest ByteBuffer body leading to an empty request body being sent. To resolve the issue the ByteBuffer creation is deferred and made replayable so that any side-affect operation won't leave the body empty when the request is finally sent.

#14917 acts as a follow-up to validate locations where HttpRequest bodies are consumed to ensure this issue doesn't happen again.

#14918 acts as another follow-up to add a From Source test run to the daily live tests.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels Sep 8, 2020
@alzimmermsft alzimmermsft self-assigned this Sep 8, 2020
@ghost ghost added App Configuration Azure.ApplicationModel.Configuration Azure.Identity labels Sep 8, 2020
@alzimmermsft
Copy link
Member Author

/azp run java - appconfiguration - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alzimmermsft
Copy link
Member Author

/azp run java - appconfiguration - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alzimmermsft
Copy link
Member Author

/azp run java - formrecognizer - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alzimmermsft
Copy link
Member Author

/azp run java - textanalytics - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alzimmermsft alzimmermsft changed the title Fix AppConfiguration live tests Fix HttpRequest Body Being Consumed and Sending an Empty Request Body Sep 8, 2020
@alzimmermsft alzimmermsft marked this pull request as ready for review September 8, 2020 20:28
Copy link
Member

@srnagar srnagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alzimmermsft
Copy link
Member Author

/check-enforcer override

@alzimmermsft
Copy link
Member Author

Overriding check-enforcer as Azure Pipelines cancelled a couple pipelines which caused it to never report passing.

@alzimmermsft alzimmermsft merged commit 259e63f into Azure:master Sep 8, 2020
@alzimmermsft alzimmermsft deleted the AzCore_FixBufferConsumption branch September 8, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration Azure.Core azure-core Azure.Identity Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants