Hi,
Working on an embedded device, trying to add a file to Dropbox and put some data into it.
The operation succeeds, and my file + correct data is on dropbox. However I get a HTTP/1.1 400 Bad Request as a second response from the dropbox server.
The body of the message cotains:
Error (4xx) We can't find the page you're looking for.
I am doing this in a bare metal approach, and as a result I only have access to the raw data being transmitted over the secure socket:
(Note: I've shortended some returns to hide important info)
Firstly the upload post:
POST /2/files/upload HTTP/1.1
host: content.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxx
Content-Type: application/octet-stream
Content-Length: 18
Dropbox-API-Arg: {"path": "/SN_WIN32/test.txt","mode": "add","autorename": true,"mute": false,"strict_conflict": false}
THIS IS SOME DATA
Then the first response from dropbox.
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 20 Jun 2020 01:06:44 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
cache-control: no-cache
pragma: no-cache
X-Server-Response-Time: 702
X-Dropbox-Request-Id: e4f48d1218f0f1cd0af9dc01be5f0512
X-Robots-Tag: noindex, nofollow, noimageindex
17a
{"name": "test.txt", "path_lower": "/sn_win32/test.txt", "path_display": "/SN_WIN32/test.txt", "id": "id:xxxx", "client_modified": "2020-06-20T00:56:20Z", "server_modified": "2020-06-20T00:56:21Z", "rev": "xxx", "size": 18, "is_downloadable": true, "content_hash": "510320d6206ba597e7c49272954b27a2150804a12fa8073162493fca985bf971"}
0
Then the second response from dropbox.
HTTP/1.1 400 Bad Request
Server: nginx
Date: Sat, 20 Jun 2020 01:06:44 GMT
Content-Type: text/html
Content-Length: 25658
Connection: close
ETag: "5ed1892e-643a"
X-Dropbox-Request-Id: b184039321d978148fc4c7e45f85646f
X-Robots-Tag: noindex, nofollow, noimageindex
<SNIP>
<div class="not-found"> <h1>Error (4xx)</h1> We can't find the page you're looking for.
<SNIP>
Finally, if I try and do a file append, I get the same types of responses and my connection gets closed by Drobox.
Can anyone identify what I am doing wrong?
Thanks!