Plugin Directory

Changeset 1538715


Ignore:
Timestamp:
11/22/2016 10:14:07 PM (8 years ago)
Author:
andy
Message:

batcache: Only cache GET or HEAD

https://github.com/Automattic/batcache/pull/68

File:
1 edited

Legend:

Unmodified
Added
Removed
  • batcache/trunk/advanced-cache.php

    r1538700 r1538715  
    338338    return;
    339339
    340 // Never batcache a POST request.
    341 if ( ! empty( file_get_contents("php://input") ) || ! empty( $_POST ) ||
    342     ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) )
    343 {
     340// Only cache HEAD and GET requests.
     341if ((isset($_SERVER['REQUEST_METHOD']) && !in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD')))) {
    344342    return;
    345343}
Note: See TracChangeset for help on using the changeset viewer.