Bitbucket returns broken URL for Golang go-get=1 URL suffix

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: Low
    • None
    • Affects Version/s: 6.10.5, 7.12.0, 6.10.11, 7.12.1
    • None
    • 1
    • Severity 2 - Major

      Issue Summary

      Bitbucket returns an incorrect URL for the request with the go-get=1 suffix which makes it unusable for hosting repositories for Golang modules.

      Steps to Reproduce

      Connect to the repository with go-get=1 suffix with curl:

      curl -Ss -u siteadmin "https://bitbucketdc/scm/myrepo?go-get=1"
      

      Expected Results

      Bitbucket responds with the output with correct URL:

      <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="go-import" content="bitbucketdc/scm/myrepo git https://bitbucketdc/scm/scm/myrepo.git"></head><body></body></html>%
      

      Actual Results

      The response contains broken URL (with double "scm") which breaks the automatic import of Golang modules.

      <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="go-import" content="bitbucketdc/scm/myrepo git https://bitbucketdc/scm/scm/myrepo.git"></head><body></body></html>%
      

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Anton Shaleev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: