TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

createWriteStream does not honor the size option #330

Closed kellymclaughlin closed 7 years ago

kellymclaughlin commented 7 years ago

The client module's createWriteStream function does not honor the size option unlike the put function.

I ran into this running the muskie test suite in my manta test environment. Many of the PUT tests were returning a 507 NotEnoughSpace error despite the modest size of the test payloads and plenty of free space on my Manta system. Looking at the log output from muskie showed that there was no Content-Length header provided causing this problem. It appears that the muskie tests do intend to set this header based on these two implementations of writeObject: ac.test.js and auth.test.js

kellymclaughlin commented 7 years ago

On further inspection I notice that createWriteStream always uses chunked encoding and therefore specifying a Content-Length header is not appropriate. Instead I'll look at changing the muskie tests to use put instead.