Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Apache HttpClient API changes breaks redirect handling in RestTemplate for metadata retrieval #5989

Closed
corneil opened this issue Oct 16, 2024 · 0 comments
Assignees
Labels

Comments

@corneil
Copy link
Contributor

corneil commented Oct 16, 2024

Description:
When accessing OCI registries the redirect requires the removal of the Authentication header.

Apache Http Client v5 org.apache.hc.client5.http.protocol.RedirectStrategy now only returns URI and not HttpUriRequest which prevents the modification of HTTP Headers.

** Release **
Spring Framework 6.x

@corneil corneil self-assigned this Oct 16, 2024
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 16, 2024
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 16, 2024
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 16, 2024
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 16, 2024
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 17, 2024
Remove comments from test controller.
Reverted ContainerRegistryService
Add SpecialRedirectExec to replace RedirectExec.
Ensure DropAuthorizationHeaderRequestRedirectStrategy changes request headers used to create the redirect request.

Fixes spring-attic#5989
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 18, 2024
Provide followRedirect to remove Authorization.

Fixes spring-attic#5989
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 18, 2024
Provide followRedirect to remove Authorization.

Fixes spring-attic#5989
corneil pushed a commit to corneil/spring-cloud-dataflow that referenced this issue Oct 21, 2024
onobc pushed a commit that referenced this issue Nov 7, 2024
This commit changes the underlying http client used by the RestTemplate in the
Container Image Registry component from Apache Http Client to Reactor Netty.

Our upgrade to Spring Boot 3.x brought with it an update from 4.x to 5.x for the
Apache Http client. The 5.x line removes support for dropping  headers - which
is a requirement of this component.

Moving to Reactor Netty solves the redirect issue while also greatly reducing the
complexity of this code.

Fixes #5989
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant