kubo/core/corehttp
Marcin Rataj 4cabdfefbf
feat(gateway): Block and CAR response formats (#8758)
* 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)
2022-03-17 17:15:24 +01:00
..
commands.go fix: allow ipfs-companion browser extension to access RPC API (#8690) 2022-03-17 00:07:52 +01:00
corehttp.go chore: update go-multiaddr and go-multiaddr-net 2020-08-25 15:24:48 -04:00
gateway_handler_block.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_handler_car.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_handler_unixfs_dir.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_handler_unixfs_file.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_handler_unixfs.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_handler.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway_indexPage.go fix: avoid panic on short hash 2021-07-30 11:33:53 -07:00
gateway_test.go feat(gateway): Block and CAR response formats (#8758) 2022-03-17 17:15:24 +01:00
gateway.go feat(cli): add daemon option --agent-version-suffix (#8419) 2021-09-21 20:31:08 +02:00
hostname_test.go fix: rewrite dependencies over the go-ipfs-config package 2022-03-04 09:45:16 +01:00
hostname.go fix: rewrite dependencies over the go-ipfs-config package 2022-03-04 09:45:16 +01:00
lazyseek_test.go test(gateway): test the lazy seeker 2020-01-05 16:43:45 -08:00
lazyseek.go fix(gateway): fix seek read length typo 2020-01-05 16:43:45 -08:00
logs.go fix(tracing): remove event tracing 2020-01-28 21:31:12 -08:00
metrics_test.go fix(corehttp): adjust peer counting metrics (#8577) 2021-12-02 17:03:00 -08:00
metrics.go fix(corehttp): adjust peer counting metrics (#8577) 2021-12-02 17:03:00 -08:00
mutex_profile.go feat: add endpoint for enabling block profiling (#8469) 2022-03-11 14:32:59 -05:00
option_test.go http: use Method* constants 2020-01-10 10:19:08 +01:00
p2p_proxy_test.go rename ProxyOption to P2PProxyOption 2020-03-17 19:34:44 -07:00
p2p_proxy.go p2p-proxy: earlier peerID validation check 2020-12-01 12:24:18 -05:00
redirect.go fix the wrong path configuration in root redirection 2019-04-15 12:35:45 +09:00
webui.go feat: ipfs-webui v2.15 (#8712) 2022-03-01 19:03:06 +01:00