api.put: fix hangs when uploading files via PUT

Can't seem to make PUT requests (introduced in 9d5f00f70df)
work without forcing "Transfer-Encoding: chunked".

requests seem to strap on correct Content-Length and read/send the
right amount of bytes from source file, yet server apparently waits
for more... or something like that.