Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers #16971

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

Merged
merged 2 commits into from
Dec 18, 2015

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Dec 11, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #12990 #13187
License MIT
Doc PR ~

@@ -192,6 +192,10 @@ public function prepare(Request $request)
// Use X-Sendfile, do not send any content.
$type = $request->headers->get('X-Sendfile-Type');
$path = $this->file->getRealPath();
// Fall back to scheme://path for stream wrapped locations.
if (empty($path)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

just check if is equal false

@jakzal jakzal force-pushed the http-foundation/xsendfile-streams branch from 74246be to 1da3d61 Compare December 12, 2015 19:44
@dunglas
Copy link
Member

dunglas commented Dec 14, 2015

👍

Status: Reviewed

@nicolas-grekas
Copy link
Member

Thank you @jakzal.

@nicolas-grekas nicolas-grekas merged commit 1da3d61 into symfony:2.3 Dec 18, 2015
nicolas-grekas added a commit that referenced this pull request Dec 18, 2015
…onse with stream wrappers (jakzal, Sander-Toonen)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers

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

Commits
-------

1da3d61 [HttpFoundation] Added the ability of mapping stream wrapper protocols when using X-Sendfile
dd129b7 [HttpFoundation] Add a test case for using BinaryFileResponse with stream wrappers
@nicolas-grekas
Copy link
Member

Thank you @Sander-Toonen

@jakzal jakzal deleted the http-foundation/xsendfile-streams branch December 20, 2015 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants