[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3777: Some potential issues with GET /v1/immutable/:storage_index

Tahoe-LAFS trac at tahoe-lafs.org
Mon Aug 23 14:11:04 UTC 2021


#3777: Some potential issues with GET /v1/immutable/:storage_index
----------------------+---------------------------
 Reporter:  itamarst  |          Owner:
     Type:  defect    |         Status:  new
 Priority:  normal    |      Milestone:  undecided
Component:  unknown   |        Version:  n/a
 Keywords:            |  Launchpad Bug:
----------------------+---------------------------
 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.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3777>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list