Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RedirectPolicy into azure-core #23095

Closed
3 tasks
alzimmermsft opened this issue Jul 20, 2021 · 0 comments · Fixed by #23617
Closed
3 tasks

Add RedirectPolicy into azure-core #23095

alzimmermsft opened this issue Jul 20, 2021 · 0 comments · Fixed by #23617
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.

Comments

@alzimmermsft
Copy link
Member

alzimmermsft commented Jul 20, 2021

Create a new HttpPipelinePolicy in azure-core which is capable of handling redirect responses and forwarding the request to the new location. Given that this will be a generic policy, RedirectPolicy should have the following configurations available:

  • Redirect location extraction function (Function<HttpResponse, String>)
  • Redirect update consumer (Consumer<String>)
  • Predicate which determines if a redirect is needed and allowed (Predicate<HttpResponse>)

Additionally, the HttpClient implementations provided by the SDKs, azure-core-http-netty and azure-core-http-okhttp, should be investigated into what they do internally when a redirect response is returned to them. Their redirect handling should be documented and determined whether it should be implicit handled once the policy is created.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core feature-request This issue requires a new behavior in the product in order be resolved. labels Jul 20, 2021
@alzimmermsft alzimmermsft added this to the [2021] September milestone Jul 20, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants