[wp-trac] [WordPress Trac] #45933: WSODs protection returns incorrect content type

WordPress Trac noreply at wordpress.org
Sat Jan 12 13:43:40 UTC 2019


#45933: WSODs protection returns incorrect content type
----------------------------------+------------------------------
 Reporter:  spacedmonkey          |       Owner:  (none)
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Bootstrap/Load        |     Version:  trunk
 Severity:  normal                |  Resolution:
 Keywords:  servehappy has-patch  |     Focuses:  multisite
----------------------------------+------------------------------
Changes (by spacedmonkey):

 * keywords:  needs-patch servehappy => servehappy has-patch


Comment:

 In [https://core.trac.wordpress.org/attachment/ticket/45933/45933.diff
 45933.diff] I had a first pass at handling REST API requests. However, it
 proved much much harder than I thought to handle REST requests than I
 thought. It is extremely hard to workout the request is meant to be REST
 API. This patch add `is_doing_rest`, that tries it's best to guess if the
 current request.

 One of the biggest problems I had when testing this, was the fact that
 `rest_api_loaded` calls `die` instead of `exit` means that, the shutdown
 handler were never called.

 I am looping @rmccue because we need a little history here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45933#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list