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

GET Content REST API is taking the Title filter as Case Sensitive

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.7.1
    • 6.4.2, 6.6.0
    • None

    Description

      Summary

      Get content REST API is taking the Title filter as Case Sensitive

      When using Rest API to Get Content from Confluence with the title filter, the page title is case sensitive
      But when accessing Confluence from browser, it is case insensitive. Regardless of upper or lower case is used for the Page Title, it will still load the page.

      Steps to Reproduce

      1. Create a Space and Page in it with the information below:
        • Space Key: CONF
        • Page Title: UPPER CASE lower case
      2. Make sure both URL can be accessed from the browser (I'm using /confluence as context path in this testing but it doesn't matter if you have it or not):
        • http://<My_Confluence_URL>:8090/confluence/display/CONF/UPPER+CASE+lower+case
        • http://<My_Confluence_URL>:8090/confluence/display/CONF/upper+case+lower+case
      3. Change the URL in the browser as below and browse it:
        • http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=UPPER+CASE+lower+case
        • http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=upper+case+lower+case

      Expected Results

      Both of the REST API url return with the same result

      Actual Results

      • Result from http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=UPPER+CASE+lower+case
        {"results":[{"id":"5177359","type":"page","status":"current","title":"UPPER CASE lower case","extensions":{"position":"none"},"_links":{"webui":"/display/CONF/UPPER+CASE+lower+case","edit":"/pages/resumedraft.action?draftId=5177359&draftShareId=8d8c8428-5563-419c-bca5-36d87f23ed4d","tinyui":"/x/DwBP","self":"http://<My_Confluence_URL>:8090/confluence/rest/api/content/5177359"},"_expandable":{"container":"/rest/api/space/CONF","metadata":"","operations":"","children":"/rest/api/content/5177359/child","restrictions":"/rest/api/content/5177359/restriction/byOperation","history":"/rest/api/content/5177359/history","ancestors":"","body":"","version":"","descendants":"/rest/api/content/5177359/descendant","space":"/rest/api/space/CONF"}}],"start":0,"limit":25,"size":1,"_links":{"self":"http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=UPPER+CASE+lower+case","base":"http://<My_Confluence_URL>:8090/confluence","context":"/confluence"}}
        
      • Result from http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=upper+case+lower+case
        {"results":[],"start":0,"limit":25,"size":0,"_links":{"self":"http://<My_Confluence_URL>:8090/confluence/rest/api/content?spaceKey=CONF&title=upper+case+lower+case","base":"http://<My_Confluence_URL>:8090/confluence","context":"/confluence"}}
        

        Note

        Since browsing Confluence from browser URL is not Case Sensitive. REST API shouldn't need to be case sensitive as well.
        Even if case sensitive is required, returning a 404 Not Found would be good to indicate the page is not found within the space.

      Attachments

        Issue Links

          Activity

            People

              mbereznitsky Mark Bereznitsky
              btan@atlassian.com Damien Tan
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: