8000 Changing the parsing of headers reflects in trouble in laravel projects · Issue #47747 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Changing the parsing of headers reflects in trouble in laravel projects #47747
Closed
@realtebo

Description

@realtebo

Symfony version(s) affected

6.1.5 (version of symfony/http-foundation)

Description

this was the sintax we used to use.

Note $headers

public function showPdf($id)
{
    $headers = [
        'Content-Type: application/pdf',
    ];

  ... cutted ..

    return response()->file($pathToFile,$headers);
}

This code adds an header named Content-Type with value: application/pdf

This will not work anymore since 6.1.5 of this package

After the upgrade it create an header named 0 with value Content-Type: application/pdf

Since now, only this following syntax works . But we must fix EVERY SINGLE LARAVEL PROJECT

    $headers = [
        'Content-Type' => 'application/pdf',
    ];

How to reproduce

I am able to reproduce only in a laravel project

Possible Solution

I ask for a revert

Additional Context

No response

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

      0