Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swarm/api: Multihash handler for resource updates in swarm api #400

Closed
nolash opened this issue Apr 18, 2018 · 1 comment
Closed

swarm/api: Multihash handler for resource updates in swarm api #400

nolash opened this issue Apr 18, 2018 · 1 comment

Comments

@nolash
Copy link
Contributor

nolash commented Apr 18, 2018

The Mutable Resources backend treats multihash has a special data case, when the datalength is set to 0 (it has a special UpdateMultihash method that does it automatically).

However, the api has no way of specifying that an update is a multihash. Thus, upon retrieval, the http server cannot distinguish this also.

In cases where the content is a swarm multihash, it should automatically retrieve the resource the hash points to and serve that to the client instead.


Currently, a raw resource update is made by POSTing data to bzz-resource://somename.eth.

One suggestion could be to have bzz-resource://somename.eth for multihashes, and bzz-resource://somename.eth/raw for others.

GET bzz-resource:// methods should also indicate if the response is raw or multihash, maybe using Content-Type header.

@cobordism
Copy link

How does this relate to: #186

@gbalint gbalint closed this as completed May 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants