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

Merged

Conversation

stodorovic
Copy link

  • Cleanup/optimize fallback function for apache_request_headers.
  • Cleanup related code.

$remote_mod_time = $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ];
else
$remote_mod_time = null;
$headers = apache_request_headers();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 optimize_apache_response_headers branch December 22, 2018 12:14
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.

2 participants