kubo/core/commands
Andrew Gillis 77ed3dd0ef
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Check / lint (push) Has been cancelled
Docker Check / build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / unit-tests (push) Has been cancelled
Go Test / cli-tests (push) Has been cancelled
Go Test / example-tests (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
feat(rpc): Content-Type headers and IPNS record get/put (#11067)
* fix http header when compress enabled for get command

Closes #2376

* fix(rpc): set Content-Type for ipfs get based on output format

- set application/x-tar when outputting tar (default and --archive)
- set application/gzip when compression is enabled (--compress)
- update go-ipfs-cmds with Tar encoding type and RFC 6713 compliant
  MIME types (application/gzip instead of application/x-gzip)

* test(rpc): add Content-Type header tests for ipfs get

* feat(rpc): add Content-Type headers for binary responses

set proper Content-Type headers for RPC endpoints that return binary data:

- `dag export`: application/vnd.ipld.car
- `block get`: application/vnd.ipld.raw
- `diag profile`: application/zip
- `get`: application/x-tar or application/gzip (already worked, migrated to new API)

uses the new OctetStream encoding type and SetContentType() method
from go-ipfs-cmds to specify custom MIME types for binary responses.

refs: https://github.com/ipfs/kubo/issues/2376

* feat(rpc): add `ipfs name get` command for IPNS record retrieval

add dedicated command to retrieve raw signed IPNS records from the
routing system. returns protobuf-encoded IPNS record with Content-Type
`application/vnd.ipfs.ipns-record`.

this provides a more convenient alternative to `ipfs routing get /ipns/<name>`
which returns JSON with base64-encoded data. the raw output can be piped
directly to `ipfs name inspect`:

    ipfs name get <name> | ipfs name inspect

spec: https://specs.ipfs.tech/ipns/ipns-record/

* feat(rpc): add `ipfs name put` command for IPNS record storage

adds `ipfs name put` to complement `ipfs name get`, allowing users to
store IPNS records obtained from external sources without needing the
private key. useful for backup, restore, and debugging workflows.

the command validates records by default (signature, sequence number).
use `--force` to bypass validation for testing how routing handles
malformed or outdated records.

also reorganizes test/cli files:
- rename http_rpc_* -> rpc_* to match existing convention
- merge name_get_put_test.go into name_test.go
- add file header comments documenting test purposes

* chore(deps): update go-ipfs-cmds to latest master

includes SetContentType() for dynamic Content-Type headers

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2026-01-30 23:41:55 +01:00
..
cmdenv feat: fast provide support in dag import (#11058) 2025-11-14 21:06:25 -08:00
cmdutils fix(routing): defensive clone of AddrInfo from provider channel (#11120) 2026-01-09 21:40:38 +01:00
dag feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
e Fix typo in an error.go comment: "is adds" -> "adds". 2018-01-17 15:25:54 -08:00
keyencode chore: bump go-libp2p v0.22.0 & go1.18&go1.19 2022-09-09 17:09:38 +02:00
name feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
object core/commands!: remove deprecated object APIs (#10375) 2024-03-22 09:32:30 +01:00
pin Add bytes progress tracker for ipfs pin add (#11074) 2025-12-02 17:11:22 -08:00
active.go refactor: use slices.Sort where appropriate (#10858) 2025-07-08 18:43:23 +02:00
add.go feat: fast provide support in dag import (#11058) 2025-11-14 21:06:25 -08:00
bitswap.go fix(rpc): restore and reprecate bitswap reprovide (#10699) 2025-02-10 16:12:53 +01:00
block.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
bootstrap.go feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
cat.go chore: use errors.New to replace fmt.Errorf with no parameters (#10617) 2024-12-10 13:50:35 -08:00
cid_test.go Nonfunctional (#10753) 2025-03-11 14:04:16 -07:00
cid.go feat(ci): reusable spellcheck from unified CI (#10873) 2025-08-14 00:35:35 +00:00
commands_test.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
commands.go fix(cmd): exit 1 on error (#10903) 2025-08-08 17:25:05 -07:00
completion.go refactor: use slices.Sort where appropriate (#10858) 2025-07-08 18:43:23 +02:00
config_test.go test: TestEditorParsing 2025-07-08 18:43:47 +02:00
config.go feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
dht_test.go refactor: namesys cleanup, gateway /ipns/ ttl (#10115) 2023-10-18 10:23:50 +02:00
dht.go feat(cli/rpc/add): fast provide of root CID (#11046) 2025-11-14 11:08:29 -08:00
diag.go feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
external.go style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
extra.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
files_test.go refactor: replace context.WithCancel with t.Context (#11083) 2025-11-28 16:39:55 +01:00
files.go feat(mfs): chroot command to change the root (#8648) 2026-01-13 21:47:36 +01:00
filestore.go Ivan386/filestore fix (#7474) 2025-06-04 14:04:20 -07:00
get_test.go refactor: replace context.WithCancel with t.Context (#11083) 2025-11-28 16:39:55 +01:00
get.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
helptext_test.go gx: unrewrite 2019-03-05 18:33:56 +01:00
id.go fix(cmds): cleanup unicode identify strings (#9465) 2025-09-19 04:46:38 +02:00
keystore.go feat(key): add 'ipfs key ls' as alias for 'ipfs key list' (#11147) 2026-01-30 19:39:26 +01:00
log.go feat: add query functionality to log level command (#10885) 2025-08-11 12:43:48 -07:00
ls_test.go feat(cli): ls --long (#11103) 2026-01-16 02:27:32 +01:00
ls.go feat(cli): ls --long (#11103) 2026-01-16 02:27:32 +01:00
mount_nofuse.go refactor(ci): optimize build workflows (#10973) 2025-09-19 14:44:38 +02:00
mount_unix.go refactor(ci): optimize build workflows (#10973) 2025-09-19 14:44:38 +02:00
mount_windows.go cmdkit -> cmds 2019-05-10 23:00:20 -07:00
multibase.go ci: add stylecheck to golangci-lint (#9334) 2022-10-06 10:18:40 -04:00
p2p.go feat(p2p): add --foreground flag to listen and forward commands (#11099) 2026-01-09 19:22:43 +01:00
ping.go refactor: stop using go-libp2p deprecated peer.ID.Pretty 2023-09-18 15:58:15 +02:00
profile.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
provide.go feat(cli/rpc/add): fast provide of root CID (#11046) 2025-11-14 11:08:29 -08:00
pubsub.go feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
refs.go chore: upgrade to go 1.23 (#10486) 2024-08-28 18:56:45 +02:00
repo_verify_test.go test: verifyWorkerRun and helptext (#11063) 2025-11-17 18:51:33 +01:00
repo.go test: verifyWorkerRun and helptext (#11063) 2025-11-17 18:51:33 +01:00
resolve.go docs(cli): fix spelling 2023-12-04 09:40:21 +01:00
root_test.go core/corehttp!: remove /api/v0 from gateway port 2024-03-05 08:21:13 +00:00
root.go provider: clear provide queue when reprovide strategy changes (#10863) 2025-07-16 01:28:27 -07:00
routing.go fix(commands/reprovide): update manual reprovide error message (#11151) 2026-01-21 05:59:56 +01:00
shutdown.go refactor: rename to kubo 2022-07-06 18:40:37 +02:00
stat_dht.go feat(cli/rpc/add): fast provide of root CID (#11046) 2025-11-14 11:08:29 -08:00
stat_provide.go refactor: move ipfs stat provide/reprovide to ipfs provide stat (#10896) 2025-08-07 17:17:00 -07:00
stat_reprovide.go feat(ci): reusable spellcheck from unified CI (#10873) 2025-08-14 00:35:35 +00:00
stat.go feat: Provider.WorkerCount and stats reprovide (#10779) 2025-04-30 15:32:03 +02:00
swarm.go fix(cmds): cleanup unicode identify strings (#9465) 2025-09-19 04:46:38 +02:00
sysdiag.go repo: use config api to get node root path (#10934) 2025-09-02 13:13:01 -07:00
version.go feat(cli/rpc/add): fast provide of root CID (#11046) 2025-11-14 11:08:29 -08:00