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

Move calls to http_response_code() before doing print() #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

giox069
Copy link

@giox069 giox069 commented Nov 2, 2024

Calling http_response_code() after print() has no effect and it logs a warning "headers already sent" on the web server logs. When PHP has display_errors enabled, the warning is also sent as a response to the browser, and the browser is unable to open CODE application.
This commit fixes #286 and #270 by moving one http_response_code(400) call before "print", and by removing two useless http_response_code(200);, which is the default value.

Calling http_response_code() after print() has no effect and it logs a warning "headers already sent" on the web server logs. When PHP has display_errors enabled, the warning is also sent as a response to the browser, and the browser is unable to open CODE application.
This commit fixes CollaboraOnline#286 and CollaboraOnline#270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set response code - headers already sent - richdocumentscode/proxy.php on line 296
1 participant