Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10138

Bitbucket Server throws error when tries to fetch a raw json with Accept: application/json

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.2.0, 5.3.1
    • API - REST
    • None

    Description

      Summary

      Bitbucket Server throws error when tries to fetch a raw json with Accept header (Content-type: application/json) specified

      Steps to Reproduce

      curl -H "Accept: application/json" -H "Content-type: application/json" -X GET https://<URL>/projects/<project>/repos/<repo>/raw/file.json

      Expected Results

      It returns the raw contents of the file.

      Actual Results

      For versions before 5.3.0, this returns 

      {"message":"null for uri: https://<URL>/projects/<project>/repos/<repo>/raw/file.json","status-code":404} 
      

      and for versions 5.3.0+, this returns

      {"message":"null for uri: https://<URL>/projects/<project>/repos/<repo>/raw/file.json","status-code":500}
      

      Workaround

      Replace https://<URL>/projects/<project>/repos/<repo>/raw/file.json with

      https://<URL>/mvc/projects/<project>/repos/<repo>/raw/file.json

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pthaikkalloor Prasanth
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync