Wordpress/tests/phpunit/includes
James Nylen ce38b9c90a REST API: Avoid sending blank `Last-Modified` headers with authenticated requests.
This commit adds a new `WP_REST_Server#remove_header` method and uses it to clear the `Last-Modified` header when the "no caching" headers are sent (by default for all authenticated REST API requests).  This matches the behavior of the `nocache_headers` function used in other parts of WordPress.

Previously, the REST API would send an empty `Last-Modified` header in this situation.  Under some server and browser configurations, this causes browsers to cache authenticated REST API requests, which is undesirable.

Props iv3rson76, zinigor, rmccue, jnylen0.
Fixes #40444.


git-svn-id: https://develop.svn.wordpress.org/trunk@40805 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:26:48 +00:00
..
factory Multisite: Use `get_network()` in `WP_UnitTest_Factory_For_Network`. 2016-11-01 16:51:26 +00:00
bootstrap.php Build/Test Tools: Add support for PHPUnit 6+. 2017-04-23 02:05:12 +00:00
class-basic-object.php Tests: Add docblocks for `Basic_Object` and `Basic_Subclass` classes. 2016-08-30 14:31:56 +00:00
class-basic-subclass.php Tests: Add docblocks for `Basic_Object` and `Basic_Subclass` classes. 2016-08-30 14:31:56 +00:00
exceptions.php
factory.php
functions.php Build/Test tools: Don't override the `wp_set_auth_cookie()` and `wp_clear_auth_cookie()` functions. 2017-03-10 14:32:31 +00:00
install.php Tests: Fix a PHP notice introduced in [38907]. 2016-10-25 11:05:17 +00:00
mock-fs.php
mock-image-editor.php
mock-mailer.php
object-cache.php Build/Test Tools: Add object-cache.php to the unit test suite. 2017-05-01 11:20:30 +00:00
phpunit6-compat.php Build/Test Tools: Add support for PHPUnit 6+. 2017-04-23 02:05:12 +00:00
speed-trap-listener.php
spy-rest-server.php REST API: Avoid sending blank `Last-Modified` headers with authenticated requests. 2017-05-19 20:26:48 +00:00
testcase-ajax.php Build/Test Tools: Move the `setExpectedException()` method into the `WP_Ajax_UnitTestCase` class to avoid a fatal error when PHPUnit 3.6 is in use. 2017-04-23 11:45:46 +00:00
testcase-canonical.php Build/Test Tools: Avoid skipping canonical tests that are connected to open Trac tickets. 2017-04-22 18:25:30 +00:00
testcase-rest-api.php
testcase-rest-controller.php REST API: Fire correct hooks when creating users on multiste. 2016-11-09 01:34:56 +00:00
testcase-rest-post-type-controller.php REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API. 2017-02-24 18:14:21 +00:00
testcase-xmlrpc.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:30:48 +00:00
testcase.php REST API: Add `author`, `modified`, and `parent` sort order options for posts. 2017-05-10 18:51:28 +00:00
trac.php
utils.php Feeds: Remove an incorrect usage of `sizeof()` in a helper class used during unit testing of XML element handling. 2017-04-24 01:22:39 +00:00
wp-profiler.php