Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13588

ConfServlet should respect Accept request header

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha2, 2.8.3
    • Component/s: conf
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      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.

        Attachments

        1. HADOOP-13588.002.patch
          4 kB
          Weiwei Yang
        2. HADOOP-13588.001.patch
          4 kB
          Weiwei Yang

          Activity

            People

            • Assignee:
              cheersyang Weiwei Yang
              Reporter:
              cheersyang Weiwei Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: