propertyTsmCustomHTTPSClient.RedirectPolicy
property RedirectPolicy: tHttpRedirectPolicy read fRedirect write fRedirect default hrpSafeMethods;
WHICH methods Execute will follow a 3xx for. hrpSafeMethods (the default) follows GET and HEAD only. Anything else gets the 3xx back untouched, on the same reasoning StreamSec.Http.Client uses: a signed protocol binds the request URL into its signature, so re-issuing a POST elsewhere could never succeed and would only obscure the real failure. hrpAll follows every method; hrpNever follows nothing. WHAT IS FOLLOWED, AND HOW: 301, 302, 303, 307 and 308. A 303 becomes a GET with no body - that is its definition. 307 and 308 preserve method and body, which is their entire purpose, and 301/302 preserve them too (RFC 9110 permits a user agent to downgrade those to GET but does not require it, and silently discarding a request body is the worse surprise in a library). WHAT IS NEVER FOLLOWED, whatever this says: a redirect to an http URL, so a downgrade cannot put the next request in the clear. The 3xx is returned so the caller can see the target. ACROSS ORIGINS, Authorization, Proxy-Authorization and Cookie are STRIPPED before the next hop - forwarding them hands your credentials to whatever host the redirect names. Since one instance serves one origin, a cross-origin hop also reconnects, and any other exchange still in flight on the old connection is failed as retryable rather than left to time out.