Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://127.0.0.1:5001/api/v0/object/get not support CIDv1 ? #7384

Closed
garyng2000 opened this issue May 28, 2020 · 4 comments · Fixed by #10375
Closed

http://127.0.0.1:5001/api/v0/object/get not support CIDv1 ? #7384

garyng2000 opened this issue May 28, 2020 · 4 comments · Fixed by #10375
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@garyng2000
Copy link

this is what I get "expected protobuf dag node"

if I add using cid-version=1(getback the base32 hash) and feed to the api end point

@garyng2000 garyng2000 added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels May 28, 2020
@welcome
Copy link

welcome bot commented May 28, 2020

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@garyng2000
Copy link
Author

yet the command line 'ipfs object get ' works. forget to say v0.5.1 on windows

@garyng2000
Copy link
Author

further testing shows that this is just a corner case not handled.

I deliberately added a 0 length file using cid-version=1 which would cause the problem. If I turn off raw-leave at the same time, it is fine.

So to summarize :

cid-version=1&raw-leaves=true with empty file(0 length) would choke the object/get and a few other calls.

I have turned raw-leaves=false for now.

@Stebalien Stebalien added status/wontfix This will not be addressed and removed need/triage Needs initial labeling and prioritization status/wontfix This will not be addressed labels May 30, 2020
@Stebalien
Copy link
Member

You're correct, the issue is with raw leaves. The object commands are designed for the dag-pb IPLD format and only work with this format. However, raw leaves use the raw IPLD format.

I've filed an issue for fixing the documentation: #7396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants