* feat: serveRawBlock implements ?format=block
* feat: serveCar implements ?format=car
* feat(gw): ?format= or Accept HTTP header
- extracted file-like content type responses to separate .go files
- Accept HTTP header with support for application/vnd.ipld.* types
* fix: use .bin for raw block content-disposition
.raw may be handled by something, depending on OS, and .bin
seems to be universally "binary file" across all systems:
https://en.wikipedia.org/wiki/List_of_filename_extensions_(A%E2%80%93E)
* refactor: gateway_handler_unixfs.go
- Moved UnixFS response handling to gateway_handler_unixfs*.go files.
- Removed support for X-Ipfs-Gateway-Prefix (Closes#7702)
* refactor: prefix cleanup and readable paths
- removed dead code after X-Ipfs-Gateway-Prefix is gone
(https://github.com/ipfs/go-ipfs/issues/7702)
- escaped special characters in content paths returned with http.Error
making them both safer and easier to reason about (e.g. when invisible
whitespace Unicode is used)
* feat: report block count on `dag import`
* fix: clean-up dag import message format
* Only print stats when --stats flag is passed
This applies to both text and json output encoding.
- Stats data is now contained within a Stats datastructure
- Stats are printed after root so that first line of output is the same as previously, even when stats are output using --stats
* fix sharness test
* Add PayloadBytesCount to stats
* Attempt to stabilize flaky tests
* Rename PayloadBytesCount to BlockBytesCount
* Correctly calculate size or imported dag
* Use RawSize of original block for import bytes calc
* test: dag import without --stats
basic regression tests for the default output (text and json)
Co-authored-by: gammazero <gammazero@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
* add support for choosing a peer key type (e.g. RSA or Ed25519) when initializing the repo
* test all variants of ipfs init: RSA, Ed25519 and default
* update subdomain gateway sharness test to publish IPNS using RSA and
Ed25519 keys
* use default identity bit lengths defined in config repo instead of
having separate defaults in go-ipfs
* update config repo dependency
Co-authored-by: Will Scott <will@cypherpunk.email>
Co-authored-by: Petar Maymounkov <petarm@gmail.com>
* add flag to "ipfs key gen" to output keys in b36 CIDv1
* add flag to "ipfs key list" to output keys in b36 CIDv1
* add and modify corresponding sharness tests
Docker on a mac might be available, but may not be runnng. The
way the original test was written is linux-specific anyway, so
just hoist the check into the DOCKER declaration
54b1969c4b correctly switched from nc to socat, but did not account for it
not being as widely available. Adjust tests that depend on it with the
correct message.
There are also a number of comments pertaining to nc - they were not
adjusted.
excerpt of commit messages:
- update postrun functions in core/commands
- sharness: allow setting -i with TEST_IMMEDIATE=1
- cmds Run func returns error now
- gx update cmdkit to 1.1.2 and cmds to 2.0.0-beta1
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
When checking to see if GC fully reverses an `ipfs add`, we should check the
size of the actual files, not the directory sizes. A bunch of empty directories
won't use *that* much space and really shouldn't count against GC.
closes#1515
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Ideally, we'd fix this in IPTB but I'm tired of this bug and this is the easy
fix.
fixes#5272
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Before it was only set when "test_init_ipfs" is called but that is
not always used, for example in t0025-datastores.sh.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
Before, we'd check to make sure the repo, when checked through a symlink, is at
least as large as the repo *before* we checked it through the symlink. However,
this assumes that the repo can't shrink.
Really, this test exists to ensure we measure the repo size itself instead of
the size of the symlink; this commit changes the test to reflect this.
This test fails when 54d7e03303 is reverted.
fixes#4408
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>