Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6608

Using official content type for json requests

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: framework
    • Labels:
      None

      Description

      I suggest using application/json instead of application/x-json as it is official content type. It seems x-json does not cause any problem for the time being but browsers will load json responses correctly without asking for download. It's handy in development time. It also matches JQuery Accept header.

      1. x-json.diff
        0.7 kB
        Oleg Andreyev

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Oleg, If I refer to https://www.ietf.org/rfc/rfc4627.txt it should indeed be application/json. It has been registered https://www.iana.org/assignments/media-types/application/json

        Also if we would like to use x-json it should be text/x-json. I'm not sure in which occasions...

        I completed your patch (in new Solr component) and committed it at r1701915

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Oleg, If I refer to https://www.ietf.org/rfc/rfc4627.txt it should indeed be application/json. It has been registered https://www.iana.org/assignments/media-types/application/json Also if we would like to use x-json it should be text/x-json. I'm not sure in which occasions... I completed your patch (in new Solr component) and committed it at r1701915

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            redcat Oleg Andreyev
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development