HEAD requests for disk:basic page caching
-
On my website the Link http header’s value is duplicated for HEAD requests for cache hits using disk:basic page caching, it looks something like this:
Link: <http://example.com/wp-json/>; rel="https://api.w.org/", <http://example.com/>; rel=shortlink, <http://example.com/wp-json/>; rel="https://api.w.org/", <http://example.com/>; rel=shortlinkThis doesn’t happen for GET requests. Looking at the code, I think the issue is that
process_cached_page_and_exitinPgCache_ContentGrabber.phpreturns for HEAD requests, rather than exits. Changing it to exit seems to fix the issue.To reproduce the issue:
1. Turn on disk:basic page caching
2. Fetch to fill the cache: curl http://example.com/ > /dev/null
3. HEAD request: curl -I http://example.com/
The topic ‘HEAD requests for disk:basic page caching’ is closed to new replies.