8000 Can we set RedirectResponse meta refresh to 0? · Issue #23524 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Can we set RedirectResponse meta refresh to 0? #23524

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
jnvsor opened this issue Jul 16, 2017 · 5 comments
Closed

Can we set RedirectResponse meta refresh to 0? #23524

jnvsor opened this issue Jul 16, 2017 · 5 comments
Labels
Feature HttpFoundation RFC RFC = Request For Comments (proposals about features that you want to be discussed)

Comments

@jnvsor
Copy link
Contributor
jnvsor commented Jul 16, 2017
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version *

In HttpFoundation\RedirectResponse there's a fallback html body with a meta refresh set to 1 second. Can we change this to 0? As far as I'm aware all browsers support a meta refresh of 0.

@ro0NL
Copy link
Contributor
ro0NL commented Jul 16, 2017

What's the goal? AFAIK this has never been an issue to anyone, also note Refresh is a non-standard thingy in HTTP (this is probably here for historic reasons).

Reading http://www.otsukare.info/2015/03/26/refresh-http-header the Competition Of Techniques is quite interesting actually ;-)

@jnvsor
Copy link
Contributor Author
jnvsor commented Jul 16, 2017

Refresh is pretty much universally supported and doesn't rely on javascript, so it's a good way to push a redirect through if your headers are already sent. This wouldn't affect symfony per-se (since any modern framework isn't going to echo in the controller), but I know legacy projects that could benefit from the fallback.

@ro0NL
Copy link
Contributor
ro0NL commented Jul 16, 2017

well.. it doesnt hurt probably :)

@jnvsor
Copy link
Contributor Author
jnvsor commented Jul 16, 2017

Well if no-one knows a reason to leave it at 1 I'll submit a PR to change it to 0

@javiereguiluz
Copy link
Member

👍 for changing to 0

@javiereguiluz javiereguiluz added Feature HttpFoundation RFC RFC = Request For Comments (proposals about features that you want to be discussed) 7761 labels Jul 17, 2017
fabpot added a commit that referenced this issue Jul 17, 2017
…ponse content (jnvsor)

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

Discussion
----------

[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23524
| License       | MIT

Set meta refresh time to 0 in RedirectResponse content

Commits
-------

5508a00 [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
@fabpot fabpot closed this as completed Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature HttpFoundation RFC RFC = Request For Comments (proposals about features that you want to be discussed)
Projects
None yet
Development

No branches or pull requests

4 participants
0