Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.0] Response headers and cookies are no longer prematurely sent #12378

Merged
merged 3 commits into from
Aug 15, 2017
Merged

[4.0.0] Response headers and cookies are no longer prematurely sent #12378

merged 3 commits into from
Aug 15, 2017

Conversation

SidRoberts
Copy link
Contributor

@SidRoberts SidRoberts commented Oct 30, 2016

Refs: #12908

@sergeyklay
Copy link
Contributor

Could you please explain a bit more - why?

@SidRoberts
Copy link
Contributor Author

The Application class is effectively responsible for turning HTTP requests into HTTP responses. It shouldn't assume that the response will actually be sent - which is particularly true in testing.

Application requests should be handled like this:

$response = $application->handle($uri);

$response->send();

Not this:

echo $application->handle($uri)->getContent();

@sergeyklay sergeyklay merged commit abfd87e into phalcon:4.0.x Aug 15, 2017
@sergeyklay
Copy link
Contributor

Thank you

@SidRoberts SidRoberts deleted the v4-response-premature-send branch August 15, 2017 21:35
@sergeyklay sergeyklay added the breaks bc Functionality that breaks Backwards Compatibility label May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks bc Functionality that breaks Backwards Compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants