dingo / dingo/api

Dingo API Response object loses existing response HTTP Version

Open
#1,406 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The Dingo Response.php method makeFromExisting fails to clone the ProtocolVersion from the existing Illuminate/Symfony Response object, so if a previous middleware has changed it (i.e. to version 1.1), this gets lost.
Workaround is to establish an event listener for one of the Response morph events and set the protocol version on the response via the event handler, but it seems like makeFromExisting should be setting the ProtocolVersion property on the new response object to match the old response object.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.