-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropbox-Api-Arg needs encoding in the headers #54
Comments
ncw
added a commit
to ncw/dropbox-sdk-go-unofficial
that referenced
this issue
Oct 22, 2019
As part of investigating a filename corruption issue, it was noted that this SDK doesn't encode the Dropbox-API-Arg to make it "HTTP header safe" according to the specification here: https://www.dropbox.com/developers/reference/json-encoding This fixes the encoding and updates the generator to apply it everywhere. Fixes dropbox#54
|
I've made a pull request #56 to fix this - PTAL :-) |
ncw
added a commit
to ncw/dropbox-sdk-go-unofficial
that referenced
this issue
Nov 15, 2019
As part of investigating a filename corruption issue, it was noted that this SDK doesn't encode the Dropbox-API-Arg to make it "HTTP header safe" according to the specification here: https://www.dropbox.com/developers/reference/json-encoding This fixes the encoding and updates the generator to apply it everywhere. Fixes dropbox#54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An rclone user reported file name corruptions when uploading things to Dropbox with rclone - see rclone/rclone#3609 for background.
Greg K in the Dropbox developer forum was kind enough to explain the problem: https://www.dropboxforum.com/t5/API-Support-Feedback/Possible-bug-corrupting-file-names-with-certain-unicode-code/m-p/370538
In summary this was a result of:
Dropbox-Api-Argheader not being properly encodedWhen rclone does an upload using the
Uploadmethod from the SDK an HTTP transaction like this gets sent:Note how the UTF-8 characters are not encoded in the
Dropbox-Api-Argheader.In the documentation it states
This is clearly not being done, hence the problem.
For example here the JSON encoded arguments are put straight into the header as far as I can see.
dropbox-sdk-go-unofficial/dropbox/files/client.go
Lines 3617 to 3630 in af4558f
The text was updated successfully, but these errors were encountered: