[
https://issues.apache.org/jira/browse/AMBARI-26496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jialiang Cai resolved AMBARI-26496.
-----------------------------------
Fix Version/s: 3.1.0
Resolution: Fixed
> Multiple HTTP GET methods incorrectly consume entity, causing warning logs
> --------------------------------------------------------------------------
>
> Key: AMBARI-26496
> URL: https://issues.apache.org/jira/browse/AMBARI-26496
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-server
> Affects Versions: 3.1.0
> Reporter: guluo
> Assignee: guluo
> Priority: Minor
> Fix For: 3.1.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> While Ambari is running, multiple warnings were observed in the logs, such as:
> WARN [main] Errors:168 - The following warnings have been detected: WARNING:
> A HTTP GET method, public jakarta.ws.rs.core.Response
> org.apache.ambari.server.api.services.SettingService.getSetting(java.lang.String,jakarta.ws.rs.core.HttpHeaders,jakarta.ws.rs.core.UriInfo,java.lang.String),
> should not consume any entity.
>
> This issue occurs because several methods annotated with `@GET` across
> different classes include parameters that imply consuming a request entity,
> which violates HTTP GET semantics (GET requests should be idempotent and must
> not have a body)
>
> Suggested Fix:
> * Audit all `@GET` methods across the codebase.
> * Remove entity-consuming parameters from these methods.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]