This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Commit 88edd83
fix: get block with empty data (#789)
* Fix for empty data in block.
Found this very strange bug when creating DAGNode's with empty buffers for data.
streamToValue returns an empty array when the data is empty, which down the line triggers an exception in ipfs-block because this sends an empty array instead of a buffer.
* fix: get empty block for response without X-Stream-Output
js-ipfs currently does not set the X-Stream-Output header on block.get responses so we also need a check for an empty array on our buffered res.
License: MIT
Signed-off-by: Alan Shaw <[email protected]>
* chore: update to latest interface-ipfs-core
License: MIT
Signed-off-by: Alan Shaw <[email protected]>1 parent ad0a1da commit 88edd83
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments