Hi @brandonmblack, this is very helpful!
Looking at my code the only header I’m missing seems to be the X-TON-Expires is this header optional or mandatory?
I haven’t tested yet the chunks upload since the initial request fails, so the initial 403 cannot be “blamed” for that since it is during the initial request this is failing…
Also, I am running the test using a small file (11 bytes) – is this the reason why I am failing my tests as the file is under 8Mb? Is this a requirement that all files under 8Mb need to upload via non-resumeable uploads?
I have just run another requests of a file over 8Mb (83,886,080 bytes) and still getting HTTP 400 –
HttpResponseProxy{HTTP/1.1 400 Bad Request [cache-control: no-cache, connection: close, content-length: 0, date: Mon, 18 May 2015 23:11:12 GMT, server: tsa_a, set-cookie: guest_id=v1%3A143199067272724883; Domain=.twitter.com; Path=/; Expires=Wed, 17-May-2017 23:11:12 UTC, strict-transport-security: max-age=631138519, x-connection-hash: 6d029f685454d711e3aa95c6f639f9e3, x-rate-limit-limit: 90000, x-rate-limit-remaining: 89999, x-rate-limit-reset: 1431991572, x-response-time: 10] [Content-Length: 0,Chunked: false]}
The headers all look correct on this side so I am only suspecting that I need the X-TON-Expires header? Is this what is causing the failure?
POST /1.1/ton/bucket/ta_partner?resumable=true HTTP/1.1
Authorization: ...
X-TON-Content-Length: 83886080
X-TON-Content-Type: text/comma-separated-values
Content-Type: text/comma-separated-values
Content-Length: 0
Host: ton.twitter.com
User-Agent: Apache-HttpClient/4.4.1 (Java/1.8.0_40)
Accept-Encoding: gzip,deflate
Connection: close