[wp-trac] [WordPress Trac] #17246: Handling of HTTP 404 errors for non-existing files

WordPress Trac noreply at wordpress.org
Mon Jun 12 05:16:51 UTC 2017


#17246: Handling of HTTP 404 errors for non-existing files
----------------------------+--------------------------
 Reporter:  azaozz          |       Owner:
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:  maybelater
 Keywords:  needs-patch     |     Focuses:  performance
----------------------------+--------------------------
Changes (by dd32):

 * status:  reopened => closed
 * version:  trunk =>
 * resolution:   => maybelater


Comment:

 I'm re-closing this as `maybelater` as I don't think anything has changed
 here that gives any reason to look at it again.

 > I propose that we add a wp_abort_execution filter to the core, which
 would allow developers to tell Wordpress whether or not to load their
 plugin.

 If you wish to abort a request, you can simply call `die()` upon plugin
 inclusion if certain criteria are met, or you could delay it until
 WordPress is fully loaded (`init`) to allow other plugins to handle the
 request if they wish (Such as a stats plugin which wants to record all
 404's).

 > Personally, I am now including a check in all of my plugins, after
 realizing the Wordpress process executes for all missing files referenced
 in client-side mark-up.

 I'd be very careful about doing that - It's expected that
 `/blah/blah/filename.jpg` be a request that's routed to WordPress and
 handled sometimes by plugins.

 Personally I see the bug being that either the server is routing file-
 requests to WordPress when you don't want it to, or that markup is being
 used which references invalid paths.

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


More information about the wp-trac mailing list