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

Conversation

Projects
3 participants
@SidRoberts
Copy link
Member

SidRoberts commented Oct 30, 2016

Refs: #12908

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Oct 31, 2016

Could you please explain a bit more - why?

@SidRoberts

This comment has been minimized.

Copy link
Member Author

SidRoberts commented Oct 31, 2016

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 added this to the 4.0.0 milestone Oct 31, 2016

@sergeyklay sergeyklay closed this Mar 22, 2017

@sergeyklay sergeyklay reopened this Mar 22, 2017

@sjinks sjinks closed this Apr 26, 2017

@sjinks sjinks reopened this Apr 26, 2017

@SidRoberts SidRoberts force-pushed the SidRoberts:v4-response-premature-send branch from 9f7e316 to ac254c9 May 2, 2017

@SidRoberts SidRoberts changed the base branch from 3.0.x to 4.0.x May 2, 2017

@sergeyklay sergeyklay force-pushed the phalcon:4.0.x branch from cf1abda to 53683c6 Jun 18, 2017

@sergeyklay sergeyklay force-pushed the phalcon:4.0.x branch from 53683c6 to 4a7aa3c Jul 10, 2017

@SidRoberts SidRoberts force-pushed the SidRoberts:v4-response-premature-send branch 2 times, most recently from 36c74a1 to 11cba5a Aug 1, 2017

@sergeyklay sergeyklay force-pushed the phalcon:4.0.x branch from 4a7aa3c to 44ce3c6 Aug 13, 2017

@SidRoberts SidRoberts force-pushed the SidRoberts:v4-response-premature-send branch from 11cba5a to ec7c52d Aug 14, 2017

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Aug 15, 2017

Thank you

@SidRoberts SidRoberts deleted the SidRoberts:v4-response-premature-send branch Aug 15, 2017

@niden niden added this to Done in 4.0 Release Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment