[Backport 2.11] Use BytesRestResponse constructor with contentType in asRestResponse (#3717)#3721
Merged
peternied merged 2 commits intoopensearch-project:2.11from Nov 16, 2023
Conversation
…pensearch-project#3717) Modifies `SecurityResponse.asRestResponse` to use the corresponding constructor for `BytesRestResponse` if the `SecurityResponse` contains the content-type header. This adds a test that fails before the change and demonstrates how using the constructor of BytesRestResponse without content-type defaults to text/plain --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Craig Perkins <craig5008@gmail.com> Co-authored-by: Stephen Crawford <steecraw@amazon.com> Co-authored-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> (cherry picked from commit b7f47b1)
Signed-off-by: Craig Perkins <cwperx@amazon.com>
70 tasks
stephen-crawford
approved these changes
Nov 16, 2023
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 2.11 #3721 +/- ##
============================================
+ Coverage 64.86% 64.88% +0.01%
- Complexity 3613 3622 +9
============================================
Files 273 273
Lines 20024 20054 +30
Branches 3346 3348 +2
============================================
+ Hits 12989 13012 +23
- Misses 5389 5400 +11
+ Partials 1646 1642 -4
|
DarshitChanpura
approved these changes
Nov 16, 2023
Member
|
In 2.11 we are seeing issues with windows runners taking a huge amount of time compared the 2.x / main branches. Going to bypass these checks for the 2.11.1 release that is waiting on this change being merged. |
peternied
pushed a commit
to peternied/security
that referenced
this pull request
Nov 21, 2023
… asRestResponse (opensearch-project#3717) (opensearch-project#3721) Backport opensearch-project#3717 to 2.11 Signed-off-by: Craig Perkins <cwperx@amazon.com>
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.
Backport #3717 to 2.11