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

pullrequests/diff rest call returns incomplete JSON response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.12.0
    • 3.4.0, 3.9.2, 4.4.1
    • API - REST

      Summary

      When accessing the diff for large pull requests via rest, the response can be truncated.

      Steps to Reproduce

      1. Access the pull request diff rest endpoint in a browser or using cURL - https://stash.company.com/rest/api/1.0/projects/PROJECT/repos/repo/pull-requests/1804/diff
      2. Returned JSON data will be truncated

      Expected Results

      Returned JSON response is not truncated and can be parsed

      Actual Results

      JSON response is truncated.

      In the browser, the response usually ends with:

      "createdDate":1412767342465,"updatedDate":1412767404799,"comments":[],"attributes":{},"tasks":[],"permittedOperations":{"deletable":false,"editable":false}}
      

      With cURL, it can end more abruptly:

      ...,"author":{"name":"user","emai

      Workaround

      If using curl, add --http1.0 to the command.

            khughes@atlassian.com Kristy
            npellow Nick
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: