Commit Graph

243 Commits

Author SHA1 Message Date
Łukasz Magiera
e34a5e9c0d gx: update go-reuseport
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-23 16:32:32 +02:00
Steven Allen
19c3bd82a3 extract update go-testutil
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-08-16 17:23:01 -07:00
Jeromy Johnson
3b60666d25 Merge pull request #4073 from icidasset/master
Expose Content-Range header
2017-08-05 12:24:55 -07:00
Steven Allen
38a9be5a0a gx: update go-libp2p-swarm
fixes #4102 (fixed in go-libp2p-swarm)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-07-31 14:04:40 -07:00
Steven Allen
28be1d4c58 gx: update deps
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-07-27 18:48:16 -07:00
Steven Vandevelde
20ad44af1c core/http/gateway: Expose Content-Range header
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>
2017-07-19 13:28:33 +02:00
Jeromy
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
Jeromy
bda8c3a687 implement bitswap sessions
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:47:22 -07:00
Łukasz Magiera
8ab93aaeb2 Update go-datastore to 1.2.2, go-cid to 0.7.16
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-04 20:18:57 +02:00
Steven Allen
520938a9ec gx import/update libp2p/go-libp2p-routing
For some reason, this was referenced but wasn't listed in packages.json.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
Steven Allen
13636bef50 blocks: gx import go-block-format
And updated related dependencies.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
Łukasz Magiera
5ebf897f6f Show escaped url in gateway 404 message
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-06-26 19:04:18 +02:00
Jeromy Johnson
67828a4b4f Merge pull request #3963 from ipfs/feat/gateway-go-get
gateway: don't redirect to trailing slash if it's go get
2017-06-08 21:00:22 -07:00
Lars Gierth
4fe5b3eab7 gateway: don't redirect to trailing slash if it's go get
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>
2017-06-08 03:23:48 +02:00
zramsay
c5df8f0796 apply the megacheck tool to improve code quality
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-05-31 16:56:11 -04:00
Lars Gierth
64ced367ac gx: update go-libp2p-peerstore, go-libp2p, go-libp2p-kbucket
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-05-30 02:26:05 +02:00
Jeromy Johnson
4cf046c4fb Merge pull request #3928 from ipfs/feat/provide-ann-opt
update to dht code with provide announce option
2017-05-25 10:11:09 -07:00
Jeromy
53f1a9a50a make odds of 'process added after close' panic less likely
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-05-24 09:12:27 -07:00
Jeromy
0418930ca8 update to dht code with provide announce option
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-05-23 13:59:36 -07:00
James Stanley
cb2a38d89b Add Suborigin header to gateway responses (#3209)
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>
2017-05-13 10:47:36 +01:00
Jeromy
5bb480b4da improved gateway directory listing for sharded nodes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-05-05 13:31:34 -07:00
Jakub Sztandera
fe969d18be
mics: cleanup imports in touched files
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-04-24 15:01:55 +02:00
Jakub Sztandera
d1e3fc5c87
deps: Update go-is-domain to contain new gTLD
It should resolve issues with newer gTLDs being not selected

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-04-24 15:01:55 +02:00
Jeromy
b15470d548
bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-20 20:28:04 +02:00
Jakub Sztandera
584ab144f9 Merge branch 'master' into fix/gateway/3868-etag 2017-04-20 19:59:59 +02:00
Remco Bloemen
a90f4967e3 gateway: re-use resolved path
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>
2017-04-20 08:17:45 +01:00
Lars Gierth
2c4e6434ad gateway: fix erroneous Cache-Control: immutable on dir listings
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-04-19 05:10:41 +02:00
Remco Bloemen
8db6f86de6 gateway: use CID as an ETag strong validator
* 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>
2017-04-18 16:24:37 +01:00
Jeromy Johnson
2cc5ce45b8 Merge pull request #3777 from ipfs/fix/gateway-status-codes
Return 404 Not Found for failed path resolutions
2017-03-22 22:31:54 -07:00
Lars Gierth
9e4800d40a gateway: simplify error responses, switch to 404
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-03-17 04:10:28 +01:00
Lars Gierth
ee45b8d32f coreapi: make the interfaces path centric
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>
2017-03-17 03:47:59 +01:00
Lars Gierth
e260d2fd06 coreapi: smarter way of dealing with the different APIs
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-03-17 02:35:17 +01:00
Jeromy
4e168dc323 update go-libp2p-kad-dht with getclosestpeers fix
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-05 23:06:04 -08:00
Jakub Sztandera
4eed546e06
deps: update dependencies for PNet
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-22 20:04:43 +01:00
Jeromy
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
Friedel Ziegelmayer
49c30f6efe feat(webui): update to new version
Closes #3664

License: MIT
Signed-off-by: Friedel <dignifiedquire@gmail.com>
2017-02-09 12:44:30 +01:00
Jeromy
30aacd1b0a update go-libp2p with negotiate lazy fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-01-10 14:52:00 -08:00
Jeromy
d8f257c264 update libp2p for identify configuration updates
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-12-27 02:13:59 -08:00
Jakub Sztandera
912a9720bd
gateway: remove Suborigins as it conflicts the spec
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>
2016-12-19 14:41:58 +01:00
Jeromy
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
Jakub Sztandera
1e170e8d6d
Update go-libp2p across codebase
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-22 01:22:50 +01:00
Jakub Sztandera
ce96b915e7 gateway: change status code of failed namesys resution to 500
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-16 05:37:38 +01:00
Jakub Sztandera
43320e1b7f gateway: use switch for error handling
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-16 05:29:39 +01:00
Jakub Sztandera
82d46a5b5b gateway: degrade error in gateway to log to reduce noise
It logs all errors including expired IPNS keys and other non important
errors.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-16 05:25:18 +01:00
Jeromy
396c629301 update to newer ipld node interface with Copy and better Tree
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-15 18:00:49 -08:00
Jeromy Johnson
aae9eb7891 Merge pull request #3244 from ipfs/feat/gateway-post-coreapi
gateway: use core api for serving GET/HEAD/POST
2016-11-14 14:15:54 -08:00
Jeromy
7fbaae49be update to go-libp2p 4.1.0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-10 17:38:10 -08:00
Lars Gierth
0097b422de gateway: use core api for serving POST requests
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00
Lars Gierth
c31e4f7226 gateway: move context/close-notify wiring
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00
Lars Gierth
029f971d9c gateway: use core api for serving GET/HEAD requests
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00