Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3000

Incorrect 'Content-Type' response set after executing an erroneous command

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.1.0.CR1, 8.1.0.Final
    • 8.0.0.Final
    • Management
    • None
    • Hide

      Send an erroneous command to HTTP management interface and evaluate 'Content-Type' response header.

      Show
      Send an erroneous command to HTTP management interface and evaluate 'Content-Type' response header.

    Description

      The http management interface, upon error, returns an incorrect 'Content-Type' of

      'Content-Type: text/plain; charset=utf-8' 
      

      although JSON response is returned.

      To reproduce, issue from the command line a simple 'read' operation

      curl --digest -D - http://localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"read-attribute", "name":"foo"}' -u <username>:<password>
      
      ..
      Content-Type: text/plain; charset=utf-8
      Content-Length: 119
      Date: Sun, 23 Feb 2014 17:27:10 GMT
      
      {
          "outcome" : "failed",
          "failure-description" : "JBAS014792: Unknown attribute foo",
          "rolled-back" : true
      }
      

      The 'Content-Type' should have been set to 'application/json' instead of 'text/plain'

      Note: On JBoss AS 7.1.1.Final, the correct type of 'application/json' is returned for the same operation.

      Attachments

        Activity

          People

            emuckenhuber_jira Emanuel Muckenhuber (Inactive)
            cvasilak_jira Christos Vasilakis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: