8000 Browserkit back should not go back to URLs that redirect · Issue #22336 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Browserkit back should not go back to URLs that redirect #22336

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

Closed
willemstuursma opened this issue Apr 7, 2017 · 2 comments
Closed

Browserkit back should not go back to URLs that redirect #22336

willemstuursma opened this issue Apr 7, 2017 · 2 comments

Comments

@willemstuursma
Copy link
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2.6

When using BrowserKit, the back function behaves differently from a real browser such as Chrome.

In a real browser, redirects are ignored when going back. In this driver, redirect are not ignored and instead followed again.

Imagine the following requests made with a browser or this driver:

  1. http://www.example.org/1 [http 200]
  2. http://www.example.org/2 [http 302 => http://www.example.org/3]

A browser and this driver will now be at http://www.example.org/3.

Clicking back in the browser would take me back to http://www.example.org/1. Using back() in BrowserKit will take me back to http://www.example.org/2, and then again to http://www.example.org/3.

I'm a bit new to this browser stuff, so I hope this is the right place to report this issue. Let me know if it is unclear.

@sstok
Copy link
Contributor
sstok commented Apr 7, 2017

See #22341

@curry684
Copy link
Contributor
curry684 commented Apr 9, 2017

See #22341 (comment), it's a bug with BC break.

fabpot added a commit that referenced this issue Jul 6, 2017
…e-moe)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #22341).

Discussion
----------

[BrowserKit] Emulate back/forward browser navigation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22336
| License       | MIT
| Doc PR        | CHANGELOG.md updated

Hi all, please review this code for emulating back/forward browser navigation (skip redirects). If code is ok I will add tests and docs

Commits
-------

680da44 [BrowserKit] Emulate back/forward browser navigation
@fabpot fabpot closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0