Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

[Bugfix] Fix Zend Headers creation when converting from PSR #40

Closed
wants to merge 5 commits into from
Closed

[Bugfix] Fix Zend Headers creation when converting from PSR #40

wants to merge 5 commits into from

Conversation

boesing
Copy link
Member

@boesing boesing commented Dec 19, 2018

As of now, any header is being created as an Zend\Http\Header\GenericHeader instance, even if there is a dedicated class provided for a specific header.

This only happens if neither php://temp nor php://memory was used while creating the PSR-7 response.

This will fix the header creation if the response is a filesystem stream.

This will also have a slightly performance boost as the headers object is not generated anymore since they're lazy loaded by `zendframework/zend-http` `Headers` object if needed
Copy link
Member

@michalbundyra michalbundyra left a comment

Choose a reason for hiding this comment

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

LGTM 👍

weierophinney added a commit that referenced this pull request Dec 20, 2018
@weierophinney
Copy link
Member

Thanks, @boesing!

@boesing boesing deleted the bugfix/generic-headers-for-any-header branch January 2, 2019 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants