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

Optimize apache_request_headers #496



Copy link

@stodorovic stodorovic commented Dec 14, 2017

  • Cleanup/optimize fallback function for apache_request_headers.
  • Cleanup related code.
$remote_mod_time = $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ];
$remote_mod_time = null;
$headers = apache_request_headers();

This comment has been minimized.


donnchawp Feb 14, 2018

Is it safe to presume that apache_request_headers() is available? While it's unlikely, there may be users running very old versions of PHP in unusual setups.

This comment has been minimized.


stodorovic Aug 7, 2018
Author Contributor

We have fallback for this function into wp-cache-phase2.php (I've moved it from wp-cache.php to end of wp-cache-phase2.php where is optimized version). In this case, I think that's safe to we presume that this function exists (code is more readable and it's little performance improvement).

@stodorovic stodorovic changed the title Optimize apache_response_headers Optimize apache_request_headers Aug 8, 2018
@donnchawp donnchawp merged commit b3e4857 into Automattic:master Aug 8, 2018
@stodorovic stodorovic deleted the stodorovic:optimize_apache_response_headers branch Dec 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants