Skip to content

Commit

Permalink
docs: remove application/json from ipip
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed May 29, 2023
1 parent 8d73d72 commit 1aca148
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ipips/ipip-0379.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ order: 379
tags: ['ipips']
---

- Start Date: 2023-02-13
- Related Issues:

## Summary

This IPIP specifies a set of HTTP APIs to offload naming system onto another process or server.
Expand All @@ -40,8 +37,7 @@ The rationale for delegated IPNS over HTTP APIs closely follows the reasoning li

The document proposes the following:
- Use of HTTP semantics for publication and resolution of naming records.
- Preference for human-readable request and response encoding, such as JSON format
- Mandatory support for the existing :ref[IPNS Record] serialization format using `Content-Type: application/vnd.ipfs.ipns-record`
- Use of existing :ref[IPNS Record] serialization format through `Content-Type: application/vnd.ipfs.ipns-record`.
- Use of extra headers in `OPTIONS` response to communicate the supported capabilities and limitations, namely:
- `X-Ipns-Allow-Max-Size` -- to signal maximum supported IPNS record size
- `X-Ipns-Allow-Protobuf` -- to signal whether the server supports ProtocolBuffer formatted records.
Expand All @@ -62,7 +58,6 @@ This format is widely in use in IPNS over PubSub and DHT routing systems.
One of the motivations of this document is to introduce simple to use HTTP APIs and ultimately reduce barrier for interaction across alternative systems.
Further, interoperability across the existing and HTTP APIs is also desirable in order to reduce the barrier for adoption of the delegated HTTP APIs.

The specification here maintains backwards compatibility in terms of record serialisation, with preference for human-readable formats such as JSON.
To maximize interoperability with existing ecosystem, the canonical IPNS record serialization format :cite[ipns-record] (`0x0300`) can be requested with content type `application/vnd.ipfs.ipns-record`.

#### Compatibility
Expand All @@ -74,7 +69,7 @@ See "Compatibility" section of :cite[ipip-0337].
All interaction over the APIs should use TLS to protect against third-party observation and tampering.
Additionally, the IPNS records must be validated according to the rules stated in :cite[ipns-record] before further processing.

To avoid Denial of Service attack, [maximum IPNS record size defined in IPNS spec](https://specs.ipfs.tech/ipns/ipns-record/#record-size-limit) applies.
To avoid Denial of Service attack, maximum IPNS record size defined in :cite[ipns-record] applies.
Implements are permitted to set a lower limit. If lower than the default maximum, the limit should be discoverable via `OPTIONS` request with header key `X-Ipns-Allow-Max-Size` with value specified as the number of bytes.

Similarly, a client may check if a server supports ProtocolBuffer formatted records by checking the `X-Ipns-Allow-Protobuf` header key in response to `OPTIONS` request. If present the header value must be either `true` or `false` the absence of the header indicates that ProtocolBuffer formatted records are not supported.
Expand Down

0 comments on commit 1aca148

Please sign in to comment.