evently-cloud / cli

Evently Command-Line Interface
Apache License 2.0
1 stars 0 forks source link

Fix for download:ledger #40

Closed mattbishop closed 1 year ago

mattbishop commented 1 year ago

Fixes #38

mattbishop commented 1 year ago

Sigh I forgot about running the tests.

I'll have to mock both ketting and fetch to get it to work.

evert commented 1 year ago

Happy to write tests for this!

evert commented 1 year ago

Ignore my last commit, I wasn't fully sure what you were trying to do so I partially reverted it and just reintroduced the bug.

However, I have found the real issue. You were right, Ketting reads the response before we get a chance to open the stream. The specific feature that causes this is the server responding with Content-Location. When this header appears, Ketting will read the entire stream and put it in cache.

We clearly don't want this for large responses, so I have to find a way to disable this for specific requests. It's not ideal either way I realize now, so it's just an interaction I unfortunately haven't thought of.

evert commented 1 year ago

https://github.com/badgateway/ketting/issues/474