1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-12 16:11:24 +08:00

129 Commits

Author SHA1 Message Date
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
3faedb5208 remove goprocess from godeps, use gx vendored one
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
5367ee76d0 fix another panic where CloseNotify was called from wrong goroutine
panic: net/http: CloseNotify called after ServeHTTP finished

    goroutine 180 [running]:
    net/http.(*response).CloseNotify(0xc8220684e0, 0x0)
        /home/r/go/src/net/http/server.go:1535 +0x9d
    github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/prometheus/client_golang/
        /home/r/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/prome
    github.com/ipfs/go-ipfs/core/corehttp.(*gatewayHandler).getOrHeadHandler.func1(0x7
        /home/r/src/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go:119 +
    created by github.com/ipfs/go-ipfs/core/corehttp.(*gatewayHandler).getOrHeadHandle
        /home/r/src/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go:123 +

License: MIT
Signed-off-by: Robert Carlsen <rwcarlsen@gmail.com>
2016-02-09 11:09:43 -06:00
2263539c1c do that last thing again
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 15:37:39 -08:00
c0101c0c4b update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 10:19:50 -08:00
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
3d0aa592ec go-keyspace dep from libp2p added
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:08 -08:00
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
8651143344 Gateway: add support for HTTP OPTIONS request type
OPTIONS is a noop request that is used by the browsers
to check if server will accept cross-site XMLHttpRequest
(indicated by the presence of CORS headers)

Before this fix user could enable CORS headers in the Gateway config,
but XHR failed due to the lack of support for OPTIONS request type
(as described in https://git.io/vzgGe)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2016-01-21 23:22:54 +01:00
a83c3a334f use ServeContent for index.html
One advantage is that it sets the Content-Type header correctly.

License: MIT
Signed-off-by: Etienne Laurin <etienne@atnnn.com>
2016-01-12 08:22:55 -08:00
rht
743f3edcbb strings.Split -> path.SplitList
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
rht
ffd859232d Replace strings.Join(elms, "/") with path.Join(elms)
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
bf955f3560 add closenotify and large timeout to gateway
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
efac042e82 rework editor creation and finalization
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
b12ee40aba implement mark and sweep GC
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

dont GC blocks used by pinner

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

comment GC algo

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add lock to blockstore to prevent GC from eating wanted blocks

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

improve FetchGraph

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

separate interfaces for blockstore and GCBlockstore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

reintroduce indirect pinning, add enumerateChildren dag method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
c9ce2e724a Simplify Pinner interface by folding ManualPinner into Pinner
Pinner had method GetManual that returned a ManualPinner, so every
Pinner had to implement ManualPinner anyway.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
ab61ef2024 feat: Update to the latest version of the webui
License: MIT
Signed-off-by: Friedel Ziegelmayer <dignfiedquire@gmail.com>
2016-01-12 16:41:58 +01:00
8ad1141436 fixup panic catching in http handler funcs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-12-28 04:18:56 -08:00
a6eb32b77c Fix path parsing for add command
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2015-12-22 10:59:17 -05:00
0f39687fb6 Merge pull request #2019 from ipfs/Dignifiedquire-fix/access-controll-headers
Dignifiedquire fix/access controll headers
2015-12-09 00:55:06 -08:00
bdc1b27c51 hard code things
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-30 14:43:37 -08:00
3e03ae8f77 gateway: add CurrentCommit to /version
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-25 02:51:05 +01:00
8ab0ddfe44 gateway: add tests for /version
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-25 02:51:05 +01:00
021ef43418 gateway: add path prefix for directory listings
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-16 07:00:57 +01:00
2f5563b3c0 fix log hanging issue, and implement close-notify for commands
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:28 -08:00
94bdce63a7 vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
b675bfc595 webui updated to disable logs
to: /ipfs/QmR9MzChjp1MdFWik7NjEjqKQMzVmBkdK3dz14A6B5Cupm

https://github.com/ipfs/webui/pull/91

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-10-31 01:22:42 -04:00
f703b2c375 Merge pull request #1886 from ipfs/fix/ThatPut
fixing putHandler
2015-10-31 01:03:33 -04:00
c1847e9f69 putHandler: addressed CR from @jbenet
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-10-31 01:37:37 +01:00
b8b4e45665 fixing putHandler for --writable http gateway
I disabled this a long time ago and never refactored it. About time.

License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-10-28 08:11:56 +01:00
c023d187b5 update code to use new logging changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-27 11:04:56 -07:00
4555085844 fix races in http cors
License: MIT
Signed-off-by: Artem Andreenko <mio@volmy.com>
2015-10-13 01:09:55 +03:00
dd20f48454 daemon: instrument the gateway and api HTTP handlers
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-10-05 03:53:49 +02:00
8f0623255d replace imports with absolute path instead of using symlink
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-03 14:30:50 -07:00
e5512b4115 make publish more configurable and add test for repub
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-30 11:03:44 -07:00
e5a2896c0e extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
rht
8ec121239e Bump version of dir-index-html
Based on https://github.com/ipfs/go-ipfs/pull/1615

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-09-05 01:06:35 +07:00
93e9f8418b Merge pull request #1643 from ipfs/fix/repo-panic
fix panic caused by accessing config after repo closed
2015-09-04 04:01:36 +02:00
ab0c668ab8 fix panic caused by accessing config after repo closed
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 09:28:36 -07:00
rht
4b3a21eceb Humanize bytes in dir index listing
Fixes https://github.com/ipfs/dir-index-html/issues/3

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-29 09:58:21 +07:00
rht
4681db6f4c Move dir-index-html + assets to a separate repo
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-28 19:39:15 +07:00
94000e6490 replace nodebuilder with a nicer interface
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

use NewNode instead of NewIPFSNode in most of the codebase

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

make mocknet work with node constructor better

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

finish cleanup of old construction method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

blockservice.New doesnt return an error anymore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

break up node construction into separate function

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add error case to default filling on node constructor

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-27 08:43:10 -07:00
rht
de5c0ceff0 Localize the scope of context.WithCancel for every DAG.Get
Instead put it inside of DAG.Get.
The fix is applied only in the case when the context.WithCancel
before a DAG.Get is also used later on in the scope.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 22:38:04 +07:00
09d7501724 gateway: make IPNSHostname complete
IPNSHostnameOption() touches the URL path only on the way in,
but not on the way out. This commit makes it complete by
touching the following URLs in responses:

- Heading, file links, back links in directory listings
- Redirecting /foo to /foo/ if there's an index.html link
- Omit Suborigin header

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-08-17 15:39:19 +02:00
a3a10a4bc1 gateway: bring back TestGatewayGet test
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-08-17 15:27:13 +02:00
rht
dd99a70a7d Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-15 17:08:59 +07:00
39a23392c1 use rabin fingerprinting for a chunker
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

implement rabin fingerprinting as a chunker for ipfs

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

vendor correctly

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

refactor chunking interface a little

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

work chunking interface changes up into importer

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

move chunker type parsing into its own file in chunk

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-08 15:33:10 -07:00
3ee83a7c5e fix cors: defaults should take the port of the listener
need to do it this way to avoid VERY confusing situations where
the user would change the API port (to another port, or maybe even
to :0). this way things dont break on the user, and by default,
users only need to change the API address and things should still
"just work"

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
3f1cbe2f43 corehttp: add net.Listener to ServeOption
ServeOptions take the node and muxer, they should get the listener
too as sometimes they need to operate on the listener address.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
d5f94be474 fix API handler to respect referer + exit on CORS
this commit makes the API handler short circuit the request if the
CORS headers say its not allowed. (the CORS handler only sets the
headers, but does not short-circuit)

It also makes the handler respect the referer again. See security
discussion at https://github.com/ipfs/go-ipfs/issues/1532

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:11 -07:00