Create a new RedirectChain instance
the URL the connection attempt starts from, without the client's own query parameters
The URL most recently connected to
The URLs connected to, as loop detection compares them
Validates a redirect of the URL most recently connected to and returns the URL to connect to next.
the HTTP status of the redirect response
the redirect response's Location header, if any
the redirect URL, with the Location's query but without the client's own query parameters
Copyright © 2025 DiffusionData Ltd. All Rights Reserved.
The HTTP redirects followed during one connection or reconnection attempt.
Only 301, 302, 307 and 308 are followed. The Location may be a ws, wss, http or https URL, or relative to the redirected URL; http maps to ws and https to wss. The Location is checked as the Java client checks it: it must be a US-ASCII URI reference with a host and a port from 1 to 65535. A host that is not a name must be a dotted-decimal IPv4 address or an IPv6 literal without a zone, and the WHATWG URL parser must accept it. Its user information and fragment are ignored. Its path and query are kept, except that an empty path or
/becomes/diffusion.At most MAX_REDIRECTS redirects are followed, a URL may not repeat, and a secure connection is never redirected to an insecure one.