ipld / edelweiss

Decentralized Protocol Compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DAG-JSON payload is expected to end with \n

lidel opened this issue · comments

Bug

Ive tried hard coding and sending the data I get when pinging https://cid.contact/reframe?q=%A1tFindProvidersRequest%A1cKey%D8%2AX%23%00%12+%D56%5C%E5%8Bc%8D%1Fs%AC%95%1B%F5C%40Q%08%A5%02%B0DV%B3t%5B%B6%14%D5%BB%A5%E9%B61, but running ipfs routing findprovs <CID> doesnt seem to work (Kubo 0.16 cant find providers, even though it pings the indexer). I have set the content type header with content-type: application/vnd.ipfs.rpc+dag-json; version=1, but no luck

Root problem

figured it out. Seems like you need to have a \n at the end of the JSON, regardless of if the server is responding to a request with a group of messages, which is contrary to what the documentation seems to indicate:
image

proposed fix

edelweiss should not require \n at the end when a single message is sent.