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

Browser does not allow operation with FollowRedirects false #141

Open
fgm opened this issue Mar 15, 2024 · 0 comments
Open

Browser does not allow operation with FollowRedirects false #141

fgm opened this issue Mar 15, 2024 · 0 comments

Comments

@fgm
Copy link

fgm commented Mar 15, 2024

The Browser.shouldRedirect() method prevents operations when FollowRedirects is false, which is needed in some case, like debugging a form-based workflow to ascertain the data during intermediary redirect.

This is normally supported by returning ErrUseLastResponse instead of a nondescript error like that function does.

This suggests two ways to address the problem

  • either just return the ErrUseLastResponse error, which is probably the most logical, but will likely break a number of uses
  • support injecting either the Client.CheckRedirect or even the complete client in the Browser object, to allow use of a custom redirect handler, as well as other changes. One nice way to do this in compatible fashion would be for NewBrowser to take a variadic Options providing the ability to customize the browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant