headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.49k stars 160 forks source link

Browser does not allow operation with FollowRedirects false #141

Open fgm opened 7 months ago

fgm commented 7 months ago

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