-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Phalcon Double Sends Headers & Cookies #12908
Comments
Just don't use send method if you return response? Application doesn't call send anywhere so not sure what is your problem. I don't have double output - because i don't call send method. |
Are you using Micro or MVC? The send() method is not called automatically in all configurations, which may mean while it works for you it is still not correct.
Here we can see micro correctly calls the
As |
I am using MVC, but what micro has to do with application? It's different kernel, you shouldn't use both at the same time. So i still don't know what's your issue. Just to echo content in MVC application: echo $application->handle()->getContent(); No need for send method. |
I'm not using Micro, it was an inquiry. I'm not sure where we differ here but if you follow the code path there's an issue. I appreciate your taking the time to respond, but you're not providing any productive feedback. |
I'm not using too and i don't have this issue. |
With all do respect you're not being helpful.
|
@Grigoriygithub Amazing, that's exactly the issue :) Thanks!! |
Yea, PR is fine i guess, just not sure if we can add it in phalcon 3. I guess you will need to wait for phalcon 4. |
??? this should not be. |
Fixed in the 4.0.x branch |
Expected Behavior
Cookies and Headers get output once per request lifecycle.
Actual Behavior
Cookies and Headers set in
\Phalcon\Http\Response
will get output twice if a controller returns an object implementingResponseInterface
.cphalcon/phalcon/mvc/application.zep
insidehandle
cphalcon/phalcon/http/response.zep
The text was updated successfully, but these errors were encountered: