Merged
Conversation
added 5 commits
June 4, 2019 13:59
…he content is JSON. Ambari should not fail if the request is using 'Content-Type:application/json' A filter overrides the 'application/json' content type to text/plain. Change-Id: Ieb38e012c1a82f742343ecb8a539f73df457ba96
…he content is JSON. If the Content-Type of the request is "application/json", the Content-Type of response is changed to "application/json" from "text/plain". Change-Id: Ic4bf567af4ce20132c4e66fb7e2dbcbab0806292
…he content is JSON. Javadoc updated. Change-Id: Icbda33e3e588c30b9bd4ab44b78bd2775db5e1b1
Change-Id: If618d57735fecf3381a50d9bc64d33610cf3260c
Change-Id: I15f144b6805bf6488be090424d0405b4b35874e0
|
Refer to this link for build results (access rights to CI server needed): |
Change-Id: I98208f2be51aca904f8a33b00e2970eae53f4a98
Contributor
|
@dlysnichenko @mpapirkovskyy @aonishuk can any of you pls review? |
|
Refer to this link for build results (access rights to CI server needed): |
Author
|
retest this please |
|
Refer to this link for build results (access rights to CI server needed): |
ghost
approved these changes
Jun 18, 2019
added 3 commits
June 19, 2019 11:07
…class visibility. - ContentTypeOverrideFilter was moved to java.org.apache.ambari.server.api package. - Inner Response/Request wrapper classes visibility has changed to package-private to support unit testing. Change-Id: I41e8aff8ac8c1782e812f84aa9e71c5e055521df
Change-Id: I89409ee22c3a1c44b51772407f851fb05d987bb0
Change-Id: Ib6c7d1430c67f1d839f19850d3736a366d2b481b
|
Refer to this link for build results (access rights to CI server needed): |
payert
added a commit
to payert/ambari
that referenced
this pull request
Apr 16, 2020
…n the content is JSON. (apache#3015) (cherry picked from commit beb2133) Change-Id: I635cf79d14aa0c9dc671b3f12c6ea1740f7344da
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.
What changes were proposed in this pull request?
Ambari almost always responds with "Content-Type:text/plain" even if the response content itself is a JSON. Also, if Ambari is requested with "Content-Type:application/json" if fails with an exception.
This changes proposes a filter that:
Change the Content-Type of a request to text/plain if the original Content-Type is application/json to prevent Ambari failing on the application/json content.
Change to response's Content-Type to application/json if the original request's Content-Type is application/json
How was this patch tested?