Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-21232

Accepting application/json results in {"errorMessage":"You are not logged in. <a href=\"/login.action\">Log in<\/a> here and try again."}

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Low Low
    • None
    • 3.0.2, 3.4.1
    • None
    • FireFox with JSONovich plugin

      When using the JSONovich plugin for firefox, Confluence sends its not-permitted response as JSON:

      {"errorMessage":"You are not logged in. <a href=\"/login.action\">Log in<\/a> here and try again."}

      Instead of HTML.

      I send

      Host wiki.xxxx.com
      User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
      Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8,application/json
      Accept-Language en-gb,en;q=0.5
      Accept-Encoding gzip,deflate
      Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive 115
      Connection keep-alive
      Cookie JSESSIONID=B9DA0F6974E23DCB879EAADE32DAB3CC

      Response headers include

      Date Fri, 12 Nov 2010 08:32:03 GMT
      Server Apache-Coyote/1.1
      Cache-Control no-cache, must-revalidate
      Expires Thu, 01 Jan 1970 00:00:00 GMT
      X-Confluence-Request-Time 1289550723929
      Content-Type application/javascript;charset=UTF-8
      Connection close
      Transfer-Encoding chunked

      I would expect an HTML page of some description

      URL is
      http://wiki.xxxx.com/display/SITES/JSON+interface+specs

            [CONFSERVER-21232] Accepting application/json results in {"errorMessage":"You are not logged in. <a href=\"/login.action\">Log in<\/a> here and try again."}

            Hi there

            Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for quite some time now with no progress being made in that time. Rather than leave this here I'm going to close this out as won't fix. I believe this better reflects the status of this issue.

            Regards
            Steve Haffenden
            Confluence bugmaster

            Steve Haffenden (Inactive) added a comment - Hi there Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for quite some time now with no progress being made in that time. Rather than leave this here I'm going to close this out as won't fix. I believe this better reflects the status of this issue. Regards Steve Haffenden Confluence bugmaster

            I've seen this problem on both of our production installations. It's not a blocker, but it is an annoyance.

            Rome Reginelli added a comment - I've seen this problem on both of our production installations. It's not a blocker, but it is an annoyance.

            The NotPermittedAction decides whether to send a JSON response based on the following criteria:

            1. If the accept header contains any of "application/json", "application/javascript", "text/javascript" it returns JSON
            2. If the path starts with "/json" it returns JSON.

            To support this plugin the action should not return JSON when the path is not json AND the accept header contains "text/html".

            I'd suggest that it also shouldn't return JSON when the accept header doesn't indicate that JSON is acceptable, but the history of the action suggests that has caused problems in the past.

            Don Willis added a comment - The NotPermittedAction decides whether to send a JSON response based on the following criteria: If the accept header contains any of "application/json", "application/javascript", "text/javascript" it returns JSON If the path starts with "/json" it returns JSON. To support this plugin the action should not return JSON when the path is not json AND the accept header contains "text/html". I'd suggest that it also shouldn't return JSON when the accept header doesn't indicate that JSON is acceptable, but the history of the action suggests that has caused problems in the past.

            Hi Paul,

            I have created a JIRA support ticket for you at: support.atlassian.com You should receive an email shortly containing a direct link to the support ticket.

            Please refer to the support ticket for any future correspondence relating to this issue.

            In future can you please raise support requests such as this by creating an issue in our support system, https://support.atlassian.com, not in http://jira.atlassian.com. As our support engineers respond to cases in https://support.atlassian.com, it will ensure that your problem gets addressed as quickly as possible. Also, https://support.atlassian.com is configured so that only Atlassian and you have access to the case, therefore it is a more appropriate location for us to gather any required system data and configuration from you.

            Regards

            Atlassian Support Team.

            Patrick Gisbey added a comment - Hi Paul, I have created a JIRA support ticket for you at: support.atlassian.com You should receive an email shortly containing a direct link to the support ticket. Please refer to the support ticket for any future correspondence relating to this issue. In future can you please raise support requests such as this by creating an issue in our support system, https://support.atlassian.com , not in http://jira.atlassian.com . As our support engineers respond to cases in https://support.atlassian.com , it will ensure that your problem gets addressed as quickly as possible. Also, https://support.atlassian.com is configured so that only Atlassian and you have access to the case, therefore it is a more appropriate location for us to gather any required system data and configuration from you. Regards Atlassian Support Team.

              shaffenden Steve Haffenden (Inactive)
              9c026d470924 paul hinds
              Affected customers:
              2 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: