Skip to content

Commit dcb682b

Browse files
committed
specify that Retry-After header should be used to manage polling of the file upload session status
1 parent 191c9fe commit dcb682b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

peps/pep-0694.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,8 @@ The successful response includes the following:
672672
}
673673
}
674674
675+
A `Retry-After` response header **MUST** be present
676+
to indicate to clients when they should next poll for an updated status.
675677

676678
Besides the ``meta`` key, which has the same format as the request JSON, the success response has
677679
the following keys:
@@ -731,8 +733,14 @@ request), then it may return a ``202 Accepted`` response
731733
and set the status of the File Upload Session to ``processing``.
732734

733735
In either case, the server should include a ``Location`` header pointing back to the File Upload
734-
Session status URL, and if the server returned a ``202 Accepted``, the client may poll that URL to
735-
watch for the status to change.
736+
Session status URL.
737+
738+
Servers **MUST** allow clients to poll the File Upload Session status URL
739+
to watch for the status to change.
740+
If the server responds with a ``202 Accepted``,
741+
clients may poll the File Upload Session status URL to watch for the status to change.
742+
Clients **SHOULD** respect the `Retry-After` header value
743+
of the File Upload Session status response.
736744

737745
If an error occurs, the appropriate ``4xx`` code should be returned, as described in the
738746
:ref:`session-errors` section.

0 commit comments

Comments
 (0)