otavioprado opened a new pull request, #564: URL: https://github.com/apache/httpcomponents-client/pull/564
This commit adds a new implementation of the LaxRedirectStrategy, bringing back functionality similar to that found in HttpClient 4.x. The LaxRedirectStrategy automatically redirects all HEAD, GET, POST, and DELETE requests, relaxing the restrictions imposed by the HTTP specification on automatic redirection of POST methods. ### Key Features: - **Supported Methods**: Redirects HEAD, GET, POST, and DELETE methods. - **Location Resolution**: Automatically resolves relative redirect URIs against the request URI. - **Compatibility**: Ensures compatibility with existing 4.x applications by providing a familiar API and redirect behavior. - **Normalization**: Normalizes and converts the host part of the redirect URI to lowercase, maintaining consistent behavior. ### Benefits: - Simplifies migration from HttpClient 4.x to 5.x by providing a drop-in replacement for LaxRedirectStrategy. - Supports applications that rely on flexible redirect behavior for non-idempotent HTTP methods. ### Usage: ```java CloseableHttpClient httpClient = HttpClients.custom() .setRedirectStrategy(LaxRedirectStrategy.INSTANCE) .build(); -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org