From 29b43fc40aef905bad07ca993fbac1cd8cb350f3 Mon Sep 17 00:00:00 2001 From: everettraven Date: Thu, 3 Oct 2024 14:45:36 -0400 Subject: [PATCH] address review comment, other minor tweaks Signed-off-by: everettraven --- docs/refs/api/catalogd-webserver.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/refs/api/catalogd-webserver.md b/docs/refs/api/catalogd-webserver.md index d6ee38112..d9bb235cc 100644 --- a/docs/refs/api/catalogd-webserver.md +++ b/docs/refs/api/catalogd-webserver.md @@ -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: @@ -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" @@ -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.