Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Incompatible change, Reviewed
-
Conf HTTP service should set response's content type according to the Accept header in the request.
Description
ConfServlet provides a general service to retrieve daemon configurations. However it doesn't set response content-type according to Accept header. For example, by issuing following command,
curl --header "Accept:application/json" http://${resourcemanager_host}:8088/conf
I am expecting the response would be in JSON format, however it is still in XML. I can only get JSON if I issue
curl http://${resourcemanager_host}:8088/conf?format="json"
This is not the common way how clients set content-type.