ethersphere / swarm

Swarm: Censorship resistant storage and communication infrastructure for a truly sovereign digital society
https://swarm.ethereum.org/
GNU Lesser General Public License v3.0
488 stars 110 forks source link

Manifests without a default path should default to list request #156

Open gbalint opened 6 years ago

gbalint commented 6 years ago

Manifests without a default path should default to the behaviour that bzz-list:// induces. (Or at least it should be possible to enable this behaviour on the local node)

cobordism commented 6 years ago

HTTP 300 Multiple Choices Error page with link to bzz-list:// URL ?

zelig commented 6 years ago

i think this runs against the simplicity and transparency principle. @homotopycolimit suggestion is good. Also dont forget lists can be HUGE...

cobordism commented 6 years ago

If we call a manifest without a default entry, or if we simply under-specify a path (say we call up /im on a manifest that contains /images and /imgs entries) then HTTP 300 seems to be the correct response.

So, to clarify: My suggestion was that we make it such that the default response is s simple HTTP 300 error page that does not list what these multiple choices are (because the list could be very long? could it actually?) but instead offers the link to bzz-list://, allowing the end user to inspect the multiple choices if they so choose.

cobordism commented 6 years ago

At the same time we should fix bzz-list to have correct links.

Currently every link in the HTML output of a bzz-list request is itself a bzz-list. Correct would be to have bzz-list links to bzz-manifest resources and appropriate bzz-raw links to all other content. Furthermore, if a manifest in a bzz-list has an html default entry, there should be a (bzz) link to "Display / Open this manifest" or sth like that.

cobordism commented 6 years ago

c.f. https://github.com/ethersphere/go-ethereum/issues/726