1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

4650 Commits

Author SHA1 Message Date
rht
ccd06e5b66 Fix ctx used in pub.Publish
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 21:31:21 +07:00
rht
dc2153574c Remove ctx timeout in unixfsNode GetChild
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 20:02:08 +07:00
rht
30e03b2da6 Replace context.TODO in test files with context.Background
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:55:45 +07:00
rht
fcf915fc47 Define discoveryConnTimeout and set it to 30s
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:37:23 +07:00
rht
a7202fa94c Fix 'ctx, _' to have explicit cancel
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
34e06f6c95 Wire a context down to (n *helpers.UnixfsNode) GetChild
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
5d8e15042f Replace WithTimeout with WithCancel whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
d32177cda0 Make sure ctx in commands are derived from req.Context
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
a052087974 Merge pull request #1569 from rht/daemon-msg
Notify when daemon is ready
2015-08-23 05:11:27 +02:00
11a66b3efd Merge pull request #1558 from rht/cleanup-get
Refactor ipfs get
2015-08-23 05:08:21 +02:00
27e6840613 Merge pull request #1596 from ipfs/fix-test-indent
t0042: fix test indentation
2015-08-22 01:19:28 +02:00
dd6fe10f02 t0042: fix test indentation
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-08-21 20:29:18 +02:00
4cef86298e Merge pull request #1595 from ipfs/hotfix-venodr
fix master: make vendor
2015-08-20 18:22:56 +02:00
941e0769ed fix master: make vendor
blame: @whyrusleeping on ed4274c9b75b513672fa674884a5df2cdb45276c

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-20 18:15:59 +02:00
rht
9f0c8134cb Decompose DagArchive from unixfs tar
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
rht
dfa0351df9 Refactor ipfs get
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
3dfe02aa95 Merge pull request #1577 from lgierth/gateway-host-header
gateway: make IPNSHostname work on responses too
2015-08-19 05:50:05 +02:00
d1dd53bde0 Merge pull request #1587 from rht/feat/read-only-api-gateway
Add test for readonly gateway api sanitation
2015-08-19 05:49:00 +02:00
0634f98da4 Merge pull request #1588 from ipfs/version-bump
bump development version
2015-08-19 02:22:56 +02:00
e9bedb1aef bump development version
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-18 15:45:14 -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
90b6490a35 Add test for readonly gateway api sanitation
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-17 15:07:31 +07:00
d07bf89988 Merge pull request #1563 from ipfs/dag-diff
implement a basic DAG diffing algorithm
2015-08-17 04:50:32 +02:00
49dab68bfc Merge pull request #1568 from ipfs/fix/dht-commands
use correct context for dht notifs
2015-08-17 04:38:05 +02:00
e10e711a19 Merge pull request #1583 from rht/feat/read-only-api-gateway
Readonly gateway API fix
2015-08-17 04:36:54 +02:00
ee54f87411 Merge pull request #1579 from heems/nonerouter
Add router that does nothing for bitswap_wo_routing test
2015-08-17 04:32:27 +02:00
d140b8aae1 Add router that does nothing for bitswap_wo_routing test
License: MIT
Signed-off-by: Karthik Bala <karthikbala444@gmail.com>
2015-08-16 16:42:08 -07:00
rht
916f987de2 Sanitize readonly refs
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-16 07:21:10 +07:00
rht
e4dbec59cf Show readonly commands in gateway readonly API
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-16 07:03:25 +07:00
fbac82046d Merge pull request #1581 from rht/feat/read-only-api-gateway
Add readonly api to gateway
2015-08-15 12:25:34 +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
4433c30ef2 Merge pull request #1575 from ipfs/blockservice-no-err
blockservice.New doesnt need to return an error
2015-08-15 06:47:23 +02:00
7789077dbd Merge pull request #1076 from zorun/fix-listen-ipv6
Default config: listen on IPv6 for the swarm address
2015-08-15 06:41:26 +02:00
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
da75e92d5b Merge pull request #1570 from rht/config-null
Config: allow to set maps on null value
2015-08-14 04:08:45 +02:00
c1380f122b Merge pull request #1571 from ipfs/fix/refs-json
dont put newlines in refs json output
2015-08-14 04:08:30 +02:00
8d6fa2ede7 dont put newlines in refs json output
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-13 11:08:10 -07:00
rht
c0a0cde986 Config: allow to set maps on null value
Also, now, if ipfs config foo.bar has value of anything that is not map (0, "0", 0.1),
then ipfs config foo.bar.baz now returns an error instead of a panic

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 19:42:32 +07:00
afbdedb469 config set: test setting with null & not-defined parent
This adds a failing for the case described in #1561

License: MIT
Signed-off-by: Stephan Seidt <evilhackerdude@gmail.com>
2015-08-13 19:41:41 +07:00
rht
35ab1e347b Notify when daemon is ready
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 09:51:52 +07:00
64102a5810 use correct context for dht notifs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-12 16:08:57 -07:00
ace06b47d1 Merge pull request #1565 from ipfs/add-patch
cmds/add: use dagutils.Editor, like patch
2015-08-12 15:34:41 +02:00
978c9fa16f cmds/add: use dagutils.Editor, like patch
This changes the pin behavior. It uses the filenames given through
the api, and allows files to be streamed faltly (not a hierarchy),
which is easier for other things (like vinyl in node-ipfs-api land).
Files can also be entirely out of order, and the garbage intermediate
directories will not be pinned (gc-ed later).

The changes also mean the output of add has changed slightly-- it
no longer shows the local path added, but rather the dag path
relative to the added roots. This is a small difference, but changes
tests.

The dagutils.Editor creates a lot of chaff (intermediate objects)
along the way. Wonder how we might minimize the writes to the
datastore...

This commit also removes the "NilRepo()" part of the --only-hash
mode. We need to store at least in an in-mem repo/datastore because
otherwise the dagutils.Editor breaks.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-12 08:24:06 +02:00
e8d6f79062 Merge pull request #1545 from ipfs/feat/real-rabin
Feat/real rabin
2015-08-11 08:14:56 -07:00
ed4274c9b7 implement a basic DAG diffing algorithm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 17:47:08 -07:00
4d287bce51 randomly getting a bad data layout shouldnt fail the tests
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 14:44:06 -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
d1366cde1b Merge pull request #1552 from ipfs/fix-tar-reader
get: fix halt bug + improvements
2015-08-05 10:57:51 +02:00
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00