| links |
|
|---|
-
Changed the built-in document loader, context loader, and authenticated document loader to time out each call after 10 seconds by default. Previously, a remote server that responded slowly or never could hold a request for as long as the runtime and the network allowed, e.g., an incoming activity whose signature key Fedify fetched, and the sender picks such key URLs. The time limit covers the whole call, including every redirect and alternate document it follows, double-knocking retries, and reading the response body. A call that times out throws a
FetchErrorwithout a response, whosecauseis aDOMExceptionnamed"TimeoutError", so a key fetch that times out is reported as akeyFetchErrorbyverifyRequestDetailed()and is cached like other failures to fetch a key. Custom document loaders are not affected. [[#1131], [#1169]]-
Added
FederationOptions.documentLoaderTimeoutoption to change the time limit, or to turn it off withnull. -
Added the
timeoutoption togetAuthenticatedDocumentLoader().
-
-
Changed the built-in document loaders to read the body of an error response before they throw a
FetchError, at most 1 MiB, so that the time limit also bounds reading it.FetchError.responsekeeps the body byte for byte, or only the status and headers if the body is larger than that. [[#1131], [#1169]]