[wp-trac] [WordPress Trac] #14348: If it's a HEAD request, stop after the head!

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 21 08:28:45 UTC 2010

#14348: If it's a HEAD request, stop after the head!
 Reporter:  mitchoyoshitaka  |       Owner:                 
     Type:  defect (bug)     |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Performance      |     Version:  3.0            
 Severity:  normal           |    Keywords:  has-patch      

Comment(by Denis-de-Bernardy):

 Replying to [comment:5 jacobsantos]:
 > Replying to [comment:4 Denis-de-Bernardy]:
 > > I can easily picture a plugin overriding headers after an output
 buffer gets started or something similar. The patch exits too early.
 > I thought the same thing, but I was wrong. The exit()ing is not part of
 the patch, but already in the code. Also, there is a filter, called
 'wp_headers' that a plugin can hook into.

 Yes, but that exit call, if i'm recognizing the code above and below, is
 there to handle 304 / not modified requests.

 The wp_headers filter isn't of much use in practice. I can't recall the
 specific reasons, but I remember firmly dismissing it as useless for
 anything but unconditionally adding a header.

Ticket URL: <http://core.trac.wordpress.org/ticket/14348#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list