2022-12-29 08:09:23 +00:00
|
|
|
# Extended headers
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
2023-02-03 16:28:51 +00:00
|
|
|
Extended headers are used for request/response. They may contain any
|
|
|
|
user-defined headers to be interpreted on application level. Key name must be a
|
|
|
|
unique valid UTF-8 string. Value can't be empty. Requests or Responses with
|
|
|
|
duplicated header names or headers with empty values are considered invalid.
|
2022-12-29 08:09:23 +00:00
|
|
|
|
|
|
|
## Existing headers
|
|
|
|
|
2023-03-06 13:11:42 +00:00
|
|
|
There are some "well-known" headers starting with `__SYSTEM__` prefix that
|
2023-02-03 16:28:51 +00:00
|
|
|
affect system behaviour. For backward compatibility, the same set of
|
|
|
|
"well-known" headers may also use `__NEOFS__` prefix:
|
2022-12-29 08:09:23 +00:00
|
|
|
|
2023-03-06 13:11:42 +00:00
|
|
|
* `__SYSTEM__NETMAP_EPOCH` - netmap epoch to use for object placement calculation. The `value` is string
|
2022-12-29 08:09:23 +00:00
|
|
|
encoded `uint64` in decimal presentation. If set to '0' or omitted, the
|
|
|
|
current epoch only will be used.
|
2023-03-06 13:11:42 +00:00
|
|
|
* `__SYSTEM__NETMAP_LOOKUP_DEPTH` - if object can't be found using current epoch's netmap, this header limits
|
2023-02-03 16:28:51 +00:00
|
|
|
how many past epochs the node can look up through. Depth is applied to a current epoch or the value
|
2023-03-06 13:11:42 +00:00
|
|
|
of `__SYSTEM__NETMAP_EPOCH` attribute. The `value` is string encoded `uint64` in decimal presentation.
|
2022-12-29 08:09:23 +00:00
|
|
|
If set to '0' or not set, only the current epoch is used.
|
|
|
|
|
2023-02-03 16:28:51 +00:00
|
|
|
## `frostfs-cli` commands with `--xhdr`
|
2022-12-29 08:09:23 +00:00
|
|
|
|
|
|
|
List of commands with support of extended headers:
|
|
|
|
* `container list-objects`
|
|
|
|
* `object delete/get/hash/head/lock/put/range/search`
|
|
|
|
* `storagegroup delete/get/list/put`
|
|
|
|
|
|
|
|
Example:
|
|
|
|
```shell
|
2023-03-06 13:11:42 +00:00
|
|
|
$ frostfs-cli object put -r s01.frostfs.devenv:8080 -w wallet.json --cid CID --file FILE --xhdr "__SYSTEM__NETMAP_EPOCH=777"
|
2022-12-29 08:09:23 +00:00
|
|
|
```
|