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

Removes apache_response_headers and uses only headers_list #618

Merged

Conversation

stodorovic
Copy link

@stodorovic stodorovic commented Oct 2, 2018

Since apache_response_headers does not work properly in PHP 7.x, I've reported the bug 76954. This function is only required for PHP 4.x which is pretty outdated and we can use only headers_list (because WPSC requires PHP>=5.2.4) which returns array of raw headers. I've checked multiple versions of Apache/PHP (until I was researching the bug in PHP) and everything works properly.

I've created php/php-src#3566 which fixes the bug in PHP 7.x. Based on this PR (and my research), I've optimized wp_cache_get_response_headers(PHPCS fixes and avoid double processing of headers).

Short summary:

  • Removes Removes apache_response_headers since bug.
  • Optimize PHP code in wp_cache_get_response_headers.

Fixes: #539, X-Robots-Tag lost when caching

@donnchawp donnchawp merged commit dc89e11 into Automattic:master Dec 6, 2018
@stodorovic stodorovic deleted the cleanup_in_get_response_headers branch December 7, 2018 07:15
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.

Cache HTTP Headers with page content fails in some cases
2 participants