Atmos doesn't like PUT requests being sent when the object has not already been created. The Atmos driver's implementation of upload_object_via_stream was using PUT requests with Range headers unconditionally.
The attached patch gets the driver to first check if the object exists. If not, the first chunk is sent as a POST request in order to create the object. If not, the first chunk is sent as a PUT with no Range header. Subsequent chunks are all sent as PUT requests with Range headers as before.
This has been tested against Ninefold's Atmos service.