Skip to content

Commit

Permalink
address review comment, other minor tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: everettraven <[email protected]>
  • Loading branch information
everettraven committed Oct 3, 2024
1 parent 896e007 commit 29b43fc
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions docs/refs/api/catalogd-webserver.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# catalogd webserver

[catalogd](https://github.com/operator-framework/catalogd), the OLM v1 component for making catalog contents available on cluster, includes
a webserver that serves catalog contents to clients via a HTTP(S) endpoint.
a web server that serves catalog contents to clients via a HTTP(S) endpoint.

The endpoint to retrieve this information is provided in the `.status.contentURL` of a `ClusterCatalog` resource.
As an example:
Expand All @@ -19,10 +19,14 @@ As an example:
## Interacting With the Server

### Supported HTTP Methods
The HTTP request methods supported by the catalogd webserver are:

- GET
The HTTP request methods supported by the catalogd web server are:

- [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET)
- [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD)

### Response Format

Responses are encoded as a [JSON Lines](https://jsonlines.org/) stream of File-Based Catalog (FBC) [Meta](https://olm.operatorframework.io/docs/reference/file-based-catalogs/#schema) objects delimited by newlines.

??? example "Example JSON-encoded FBC snippet"
Expand Down Expand Up @@ -69,14 +73,16 @@ Responses are encoded as a [JSON Lines](https://jsonlines.org/) stream of File-B
```

### Compression Support
The `catalogd` webserver supports gzip compression of responses, which can significantly reduce associated network traffic. In order to signal to that the client handles compressed responses, the client must include `Accept-Encoding: gzip` as a header in the HTTP request.

The webserver will include a `Content-Encoding: gzip` header in compressed responses.
The `catalogd` web server supports gzip compression of responses, which can significantly reduce associated network traffic. In order to signal to that the client handles compressed responses, the client must include `Accept-Encoding: gzip` as a header in the HTTP request.

The web server will include a `Content-Encoding: gzip` header in compressed responses.

!!! note

Only catalogs that result in a response size greater than 1400 bytes will be compressed

### Cache Header Support
For clients interested in caching the information returned from the `catalogd` webserver, the webserver sets the `Last-Modified` header
on responses and support the `If-Modified-Since` request header.

For clients interested in caching the information returned from the `catalogd` web server, the `Last-Modified` header is set
on responses and the `If-Modified-Since` header is supported for requests.

0 comments on commit 29b43fc

Please sign in to comment.