10000 [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750) · Pull Request #7153 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750) #7153

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
wants to merge 5 commits into from

Conversation

ghost
Copy link
@ghost ghost commented Feb 22, 2013
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #6750
License MIT
Doc PR

* Check if we need to remove Cache-Control for ssl encrypted downloads when using IE < 9
* @link http://support.microsoft.com/kb/323308
*/
if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/(?i)msie [1-8]/', $request->server->get('HTTP_USER_AGENT')) && null === $request->server->get('HTTPS')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should replace null === $request->server->get('HTTPS') by $request->isSecure().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this regex would match IE 10+ while it does not match IE9. Is it intended ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and btw, using a case-sensitivity modifer inside the regex is useless here. You could simply apply the i modifier on the whole regex(/msie [1-8]/i)

8000

fabpot added a commit that referenced this pull request Feb 22, 2013
This PR was squashed before being merged into the 2.1 branch (closes #7153).

Commits
-------

b2080c4 [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750)

Discussion
----------

[HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6750
| License       | MIT
| Doc PR        |
@fabpot fabpot closed this Feb 22, 2013
fabpot added a commit that referenced this pull request Apr 12, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[HTTPFoundation]  Fix download over SSL using IE < 8 and binary file response

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

related to #7153

Commits
-------

4c51ec7 Fix download over SSL using IE < 8 and binary file response
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

Successfully merging this pull request may close these issues.

2 participants
0