Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BinaryFileResponse X-Sendfile support for stream wrappers #12990

Copy link
Copy link
Closed
@Sander-Toonen

Description

@Sander-Toonen
Issue body actions

Right now the combination of X-Sendfile does not work with stream wrappers when using the BinaryFileResponse.

Setup: Nginx proxies X-Accel-Redirect files to an object store and the Symfony app accesses the object store using for instance Gaufrette.

Issue: BinaryFileResponse uses getRealPath to create the default path to the file. Stream wrapped files return an empty string here.

Solution: When $this->file->getRealPath(); is empty, let $path fall back to $this->file->getPathname();. This way users can map stream wrappers to a Nginx location using the X-Accel-Mapping header.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.