Also:
* Update the blockstore/blockservice methods to match.
* Construct a new temporary offline dag instead of having a
GetOfflineLinkService method.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
The `Content-Range` header is necessary for extracting (only)
the metadata of audio files.
License: MIT
Signed-off-by: Steven Vandevelde <icid.asset@gmail.com>
This enables `go get` to parse go-import meta tags from index.html
files stored in IPFS. One tiny step toward whyrusleeping/gx-go#2.
For an import like `ipfs.io/ipfs/QmFoo/mypkg`, the gateway would
previously redirect to `/ipfs/QmFoo/mypkg/` (note the trailing slash),
which the `go get` tool can't deal with.
Thankfully, `go get` sets a URL query parameter (`?go-get=1`) which
we can use to switch off the redirect in this case.
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
This existed before but was disabled in 912a972 because the Suborigin spec
changed and it became incompatible.
This commit updates the generated Suborigin header to be conformant with the
latest spec.
License: MIT
Signed-off-by: James Stanley <james@incoherency.co.uk>
Instead of resolving a node, we resolve a path. This resolved path
is then re-used for Cat and Ls. This way, a resolve operation is
only done once.
The error messages for a failed resolve is changed from `ipfs cat …`
to `ipfs resolve …` to better reflect the API calls. The test is
updated accordingly.
License: MIT
Signed-off-by: Remco Bloemen <remco@2π.com>
* Always use the fully resolved CID from api.ResolveNode
as the ETag (also for IPNS).
* Format the result as a valid "Strong Validator"
(double quotes around the encoded CID).
Fixes#3868
License: MIT
Signed-off-by: Remco Bloemen <remco@2π.com>
The new coreiface.Path maps a path to the cid.Cid
resulting from a full path resolution.
The path is internally represented as a go-ipfs/path.Path,
but that doesn't matter to the outside.
Apart from the path-to-CID mapping, it also aims to hold all
resolved segment CIDs of the path. Right now it only exposes
Root(), and only for flat paths a la /ipfs/Qmfoo. In other cases,
the root is nil.
In the future, resolution will internally use
go-ipfs/path.Resolver.ResolvePathComponents and thus always return
the proper resolved segments, via Root(), or a future Segments() func.
- Add coreiface.Path with Cid() and Root().
- Add CoreAPI.ResolvePath() for getting a coreiface.Path.
- All functions now expect and return coreiface.Path.
- Add ParsePath() and ParseCid() for constructing a coreiface.Path.
- Add coreiface.Node and Link which are simply go-ipld-node.Node and Link.
- Add CoreAPI.ResolveNode() for getting a Node from a Path.
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
The Suborigins spec was changed and we have to adjust, the spec is still
unstable and it might change in future. Currently the only browser
supporting it (Chrome) errors out on it as it doesn't confront spec it
uses.
See https://github.com/ipfs/specs/issues/131
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>