Skip to content

Browser does not allow operation with FollowRedirects false #141

Description

@fgm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions