Skip to content

Connection header in response is always set to 'close' by response handler #19399

@khageshsaini

Description

@khageshsaini
  • Laravel Version: 5.4
  • PHP Version: 5.6.23
  • Database Driver & Version:

Description:

The response header 'Connection' is always set to 'close' by response handler. If the header set function is called to manually assign 'Connection' header to 'keep-alive', then response contains comma separated string 'keep-alive, close' which browser/client interprets as 'close'. This is present from v5.2.

Steps To Reproduce:

use response()->json($array, 200, ['Connection' => 'keep-alive']) to set the keep-alive header. The incorrect header for 'Connection' will be passed in response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions