1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

docs: fix typos in memento docs (#307)

- URI-M instead of URL-M
- remove mention of vary: accept-datetime for URI-M
This commit is contained in:
Ilya Kreymer 2018-03-05 13:12:12 -08:00
parent e812ed2d45
commit 6d879cb8b8

View File

@ -38,7 +38,7 @@ TimeGate API
The TimeGate API for any pywb collection is ``/<coll>/<url>``, eg. ``/my-coll/http://example.com/``
The timegate can either be a non-redirecting timegate (URL-M, 200-style negotiation) and return a URL-M response, or a redirecting timegate (302-style negotiation) and redirect to a URL-M.
The timegate can either be a non-redirecting timegate (URI-M, 200-style negotiation) and return a URI-M response, or a redirecting timegate (302-style negotiation) and redirect to a URI-M.
.. _memento-no-redirect:
@ -48,7 +48,7 @@ Non-Redirecting TimeGate (Memento Pattern 2.2)
This behavior is consistent with `Memento Pattern 2.2 <https://tools.ietf.org/html/rfc7089#section-4.2.2>`_ and is the default behavior.
To avoid an extra redirect, the TimeGate returns the requested memento directly (200-style negotiation) without redirecting to its canonical, timestamped url.
The 'canonical' URL-M is included in the ``Content-Location`` header and should be used to reference the memento in the future.
The 'canonical' URI-M is included in the ``Content-Location`` header and should be used to reference the memento in the future.
(For HTML Mementos, the rewriting system also injects the url and timestamp into the page so that it can be displayed to the user). This behavior optimizes network traffic by avoiding unneeded redirects.
@ -61,18 +61,17 @@ This behavior is consistent with `Memento Pattern 2.3 <https://tools.ietf.org/ht
To enable this behavior, add ``redirect_to_exact: true`` to the config.
In this mode, the TimeGate always issues a 302 to redirect a request to the "canonical" URL-M memento. The ``Location`` header is always present
In this mode, the TimeGate always issues a 302 to redirect a request to the "canonical" URI-M memento. The ``Location`` header is always present
with the redirect.
As this approach always includes a redirect, use of this system is discouraged when the intent is to render mementos. However, this approach is useful when the goal is to determine the URL-M and to provide backwards compatibility.
As this approach always includes a redirect, use of this system is discouraged when the intent is to render mementos. However, this approach is useful when the goal is to determine the URI-M and to provide backwards compatibility.
URL-M Headers
URI-M Headers
-------------
When serving a URL-M (any archived url), the following additional headers are included in accordance with Memento spec:
When serving a URI-M (any archived url), the following additional headers are included in accordance with Memento spec:
* ``Vary: accept-datetime`` is included as required
* ``Link`` header with at least ``original``, ``timegate`` and ``timemap`` relations
* ``Content-Location`` is included if using :ref:`memento-no-redirect` behavior