nim-dagger/dagger
Eric Mastro ec66e42e73
fix(rest): download unknown cid (#48)
Downloading a CID that is unknown to the network would wait for the blockexchange to try to get the data. However, a subsequent API call, eg upload for that CID, or a blockexchange timeout would cause the dagger node to crash, due to an attempt to complete a future that had already been completed.

We were able to narrow this down to an attempt to call  `resp.finish()` when the download block had already returned an `RestApiResponse` (and never sent any chunks to the response from the libp2p stream).

Change the HTTP response code for an unknown cid from 400 to 404.

Fix spelling mistake “cunk”.

Co-authored-by: Michael Bradley <michaelsbradleyjr@gmail.com>

Co-authored-by: Michael Bradley <michaelsbradleyjr@gmail.com>
2022-02-03 08:02:18 -06:00
..
blockexchange Minor cleanup and update deps (#42) 2022-01-12 16:19:37 -06:00
rest fix(rest): download unknown cid (#48) 2022-02-03 08:02:18 -06:00
stores Minor cleanup and update deps (#42) 2022-01-12 16:19:37 -06:00
utils Node setup (#32) 2022-01-10 09:32:56 -06:00
blockexchange.nim Rename bitswap (#25) 2021-08-30 13:25:20 -06:00
blocksmanifest.nim cleanup manifest (#44) 2022-01-12 19:55:51 -06:00
blocktype.nim Block.init should return Result (#37) 2022-01-10 20:25:13 -06:00
chunker.nim Minor cleanup and update deps (#42) 2022-01-12 16:19:37 -06:00
conf.nim Node setup (#32) 2022-01-10 09:32:56 -06:00
dagger.nim Node setup (#32) 2022-01-10 09:32:56 -06:00
errors.nim Node setup (#32) 2022-01-10 09:32:56 -06:00
manifest.nim cleanup manifest (#44) 2022-01-12 19:55:51 -06:00
node.nim cleanup manifest (#44) 2022-01-12 19:55:51 -06:00
rng.nim Rename bitswap (#25) 2021-08-30 13:25:20 -06:00
stores.nim Node setup (#32) 2022-01-10 09:32:56 -06:00