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

Silently ignore content on APIs that don't require it #639

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Apr 2, 2024

Description

Despite code paths and unit tests showing otherwise, OpenSearch silently ignores the content (body) of a REST request that doesn't require it. We should do the same.

Issues Resolved

Fixes #638 (or at least doesn't give users a poor experience).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Apr 2, 2024
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.28%. Comparing base (28cf793) to head (98088e7).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #639      +/-   ##
============================================
- Coverage     72.39%   72.28%   -0.11%     
+ Complexity      684      680       -4     
============================================
  Files            82       82              
  Lines          3535     3532       -3     
  Branches        288      284       -4     
============================================
- Hits           2559     2553       -6     
- Misses          850      854       +4     
+ Partials        126      125       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@owaiskazi19
Copy link
Member

owaiskazi19 commented Apr 2, 2024

We should not backport it to 2.13 as the release date is today and there will be no new RC generation

@dbwiddis dbwiddis merged commit b246341 into opensearch-project:main Apr 2, 2024
35 checks passed
@dbwiddis dbwiddis deleted the consume-content branch April 2, 2024 18:23
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 2, 2024
Signed-off-by: Daniel Widdis <[email protected]>
(cherry picked from commit b246341)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dbwiddis pushed a commit that referenced this pull request Apr 2, 2024
…641)

Silently ignore content on APIs that don't require it (#639)


(cherry picked from commit b246341)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] The RestController always consumes content when handling real HTTP requests
3 participants