Skip to content

[RFC] Implement follow redirects #2059

Description

@alexeyzimarev

The issue of redirect follow not working because of the missing cookies (#2045) triggered the following thought.

The default redirect follow by the message handler has these limitations:

  • Cookie headers get populated to the consequent request only if the cookie container is used. When we removed the cookie container from the client in v109, this scenario stopped working (described in the issue referenced above)
  • Redirect won't be followed when changing the scheme
  • Max redirect count isn't supported in WASM
  • Need to test if SeeOther redirect is supported, it might not be
  • Need to test if headers are passed to the redirect

I did an experiment here #2058 to check feasibility, and it seems to be working fine. Everything described above can be implemented, some of the things need to be guarded with opt-in options (secure to insecure redirect support, forward auth header, maybe something else).

Any thoughts and suggestions welcome.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions