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

Http method DELETE is not supported via applink from Confluence to Bitbucket

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Issue Summary

      When a rest API is used to via applink to Bitbucket from Confluence, the DELETE method fails with 405 code.

      Steps to reproduce

      We created a local bitbucket instance with a project titled TEST and added the users named admin and syed respectively. On Confluence, we created a page with the HTML macro and the script to test the GET and DELETE method via REST API.

      As you noticed in your environment, the GET method to fetch the project permissions is successful. See the screenshot below:

      However, the delete errors our with 405 response:

      Now, for further analysis, we tried to test the behavior for the DELETE method with and without the applink proxy. We used curl to eliminate any possible interference from Confluence other than the applinks. We noticed when we test the REST API without the applink proxy, the response is successful. However, when we go via the applink proxy, the response fails with 405. See below:

      Without Applink proxy with 204 response
      spasha$ curl -i -u admin:admin -X DELETE http://localhost:7990/rest/api/1.0/projects/TEST/permissions/users?name=syed
      HTTP/1.1 204
      X-AREQUESTID: @19URQ2Fx971x1166x0
      X-ASEN: SEN-500
      X-AUSERID: 1
      X-AUSERNAME: admin
      Cache-Control: no-cache, no-transform
      Vary: X-AUSERNAME
      Vary: X-AUSERID
      Vary: Cookie
      X-Content-Type-Options: nosniff
      Content-Type: application/json;charset=UTF-8
      Date: Fri, 12 Jun 2020 10:41:22 GMT
      
      With applink proxy with 405 response
      spasha$ curl -i -X DELETE http://localhost:5050/plugins/servlet/applinks/proxy?appId=5114cdc7-9eac-3480-9935-7bdefef63690&path=/rest/api/1.0/projects/TEST/permissions/users?name=syed
      [1] 29590
      C02X63V3JG5J:~ spasha$ HTTP/1.1 405
      X-Confluence-Request-Time: 1591949929076
      Content-Type: text/html;charset=utf-8
      Content-Language: en
      Content-Length: 1119
      Date: Fri, 12 Jun 2020 08:18:49 GMT
      
      <!doctype html><html lang="en"><head><title>HTTP Status 405 – Method Not Allowed</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 405 – Method Not Allowed</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Http method DELETE is not supported by this URL</p><p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.12</h3></body></html>
      [1]+  Done                    curl -i -X DELETE http://localhost:5050/plugins/servlet/applinks/proxy?appId=5114cdc7-9eac-3480-9935-7bdefef63690
      

      If you notice closely, we see that the Http method DELETE is not supported when passed via the applink proxy.

      Expected Results

      The rest call for DELETE via applink should delete the user from a project on Bitbucket.

       

      Attachments

        1. DELETE response.png
          DELETE response.png
          158 kB
        2. GET response.png
          GET response.png
          145 kB

        Activity

          People

            Unassigned Unassigned
            spasha@atlassian.com Syed Parveez Pasha
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: