-
Bug
-
Resolution: Fixed
-
High
-
None
-
1
-
Severity 2 - Major
-
752
-
Issue Summary
File content with special characters like # or URL encoded values like %26 in its name cannot be retrieved via API
Steps to Reproduce
- In a Bitbucket Cloud repo, create and commit a file with a URL encoded value or special character in its name, e.g. "test %26 file.txt" or "test # file.txt"
- If the file was created and committed locally, push it to Bitbucket remote repository
- Get the file's content with the following API endpoint:
Example call for the file name"test %26 file.txt" :
curl --request GET "https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/src/<commit-hash>/test%20%2526%20file.txt" --header 'Accept: application/json' --user '<username>:<app-password>'
Expected Results
The API call returns the content of the file.
Actual Results
The API call returns the following error:
{"type":"error","error":{"message":"No such file or directory: test & file.txt"}}
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available
- duplicates
-
BCLOUD-22276 Issue with Bitbucket APIs when filename contains #
-
- Closed
-