Class NettyHttpRedirectController
- java.lang.Object
-
- org.glassfish.jersey.netty.connector.NettyHttpRedirectController
-
public class NettyHttpRedirectController extends Object
The HTTP Redirect logic implementation for Netty Connector.- Since:
- 2.47
-
-
Constructor Summary
Constructors Constructor Description NettyHttpRedirectController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanprepareRedirect(ClientRequest request, ClientResponse response)Configure the HTTP request after HTTP Redirect response has been received.protected voidrestrictRequestHeaders(ClientRequest request, ClientResponse response)RFC 9110 Section 15.4 defines the HTTP headers that should be removed from the redirected request.
-
-
-
Method Detail
-
prepareRedirect
public boolean prepareRedirect(ClientRequest request, ClientResponse response)
Configure the HTTP request after HTTP Redirect response has been received. By default, the HTTP POST request is transformed into HTTP GET for status 301 & 302. Also, HTTP Headers described by RFC 9110 Section 15.4 are removed from the new HTTP Request.- Parameters:
request- The newClientRequestto be sent to the redirected URI.response- The original HTTP redirectClientResponsereceived.- Returns:
truewhen the new request should be sent.
-
restrictRequestHeaders
protected void restrictRequestHeaders(ClientRequest request, ClientResponse response)
RFC 9110 Section 15.4 defines the HTTP headers that should be removed from the redirected request. https://httpwg.org/specs/rfc9110.html#rfc.section.15.4.- Parameters:
request- the new request to a new URI location.response- the HTTP redirect response.
-
-