#3777 closed task

Some potential issues with GET /v1/immutable/:storage_index — at Initial Version

Reported by: itamarst Owned by:
Priority: normal Milestone: HTTP Storage Protocol
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

Downloading multiple shares is specified via the query string.

The current spec gives an example:

GET /v1/immutable/:storage_index?share=:s0&share=:sN&offset=o1&size=z0&offset=oN&size=zN

First, that example is clearly wrong (should be "offset=o0", not "offset=o1".).

Second, it's not made explicit how to match shares, offsets, and sizes. Implicitly it seems like the pattern is:

  1. First all the shares.
  2. Then, pairs of offset and size, in same order as shares.

This pattern should be explicitly documented.

Third, as part of documenting, it's worth thinking about the pattern in context of HTTP server implementations. HTTP server frameworks often don't preserve order _between_ parameters, only preserving order for multiple values of a single parameter. So e.g. ?share=1&share=2&offset=0&offset=100 will look the same as ?share=1&offset=0&share=2&offset=100 if you're using Twisted Web (or Flask), because you get back a mapping of argument key to list of values.

Change History (0)

Note: See TracTickets for help on using tickets.