[wp-trac] [WordPress Trac] #14493: do_enclose() can ping the same URL many times, can't filter URLs to ping

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 2 08:43:07 UTC 2011


#14493: do_enclose() can ping the same URL many times, can't filter URLs to ping
---------------------------------+-----------------------------
 Reporter:  mdawaffe             |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Feeds                |     Version:  3.0.1
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |
---------------------------------+-----------------------------

Comment (by solarissmoke):

 Was going to open a new ticket but I think it can be addressed here:

 `do_enclose()` does not check that the response to `wp_get_http_headers()`
 was good (i.e., HTTP 200) before trying to process it. That means that if
 you happen to have a link that is either broken or redirected (301), it
 doesn't realise this and still tries to parse the result, resulting in PHP
 notices (e.g., missing content-length header).

 Two things:

 (1) We should at least be checking for a 200 response

 (2) Maybe we could be clever and follow 301 redirects. Seeing as there are
 so many shortlinks floating about everywhere, I think this would greatly
 increase the number of hits for `do_enclose()`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14493#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list