Conversation
Contributor
Author
|
Need tests merged and changelog. |
Jorropo
commented
Nov 2, 2023
|
|
||
| func (bb *BlocksBackend) GetCAR(ctx context.Context, p path.ImmutablePath, params CarParams) (ContentPathMetadata, io.ReadCloser, error) { | ||
| if params.SkipRawBlocks.Bool() && p.RootCid().Prefix().Codec == cid.Raw { | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Needs 400:
A Gateway MUST return HTTP error 400 Bad Request when
skip-raw-blocks=yis sent for a content path with a root CID with therawmulticodec.
Comment on lines
+784
to
+793
| // FIXME(@Jorropo): this is very inneficient, we fetch all blocks even if we don't send them. | ||
| // I've tried doing so using the ipld stack however the problem is that filtering on the | ||
| // selector or traversal callback does not work because the unixfs reifier is ran before, | ||
| // so trying to filter raw links do nothing because go-unixfsnode removed them already, | ||
| // so we need to filter in a callback from unixfsnode but the reifier does not know a about | ||
| // [traversal.SkipMe] making it a lost cause. I've looked into updating unixfsnode but this | ||
| // much more work because there are no easy way to pass options or understand what the side | ||
| // effects of this would be. | ||
| // Abstractions everywhere yet a simple small behaviour change require rethinking everything :'(. | ||
| // Will fix with boxo/unixfs. |
Codecov Report
@@ Coverage Diff @@
## main #502 +/- ##
==========================================
- Coverage 65.66% 65.58% -0.09%
==========================================
Files 207 207
Lines 25604 25656 +52
==========================================
+ Hits 16814 16827 +13
- Misses 7317 7353 +36
- Partials 1473 1476 +3
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See ipfs/specs#445