-
Notifications
You must be signed in to change notification settings - Fork 119
Description
When the path contains non-ASCII characters, attempting to upload or download files results in the following error: DropboxApi::Errors::HttpError: HTTP 400
.
According to the Dropbox documentation, arguments should be escaped to Unicode escape sequences like \uXXXX
:
https://www.dropbox.com/developers/reference/json-encoding
If you use the Dropbox-API-Arg header, you need to make it "HTTP header safe". This means using JSON-style "\uXXXX" escape codes for the character 0x7F and all non-ASCII characters.
Currently, the arguments are sent using JSON.dump(params)
in DropboxApi::Endpoints::ContentDownload
and DropboxApi::Endpoints::ContentUpload
, which does not escape non-ASCII characters. This leads to the HTTP 400 error when non-ASCII characters are present in the path.