我设置
add_filter( \'http_request_redirection_count\', array($instance,\'SetDirectionCount\'));
至0我试图得到\'http://boards.ign.com/The_Vestibule/b5296/\'或\'http://www.informationweek.com/story/“但这给了我:
WP_Error Object ( [errors] => Array ( [http_request_failed]
=> Array ( [0] => Maximum (0) redirects followed ) ) [error_data] => Array ( ) )
头部未显示重定向:Array ( [headers] => Array ( [connection] => close [date] =>
Mon, 14 Mar 2011 01:40:19 GMT [server] => Microsoft-IIS/6.0 [p3p] => Array ( [0] =>
CP=\'NOI ADMa OUR STP\' [1] => CP="TST" ) [x-powered-by] => ASP.NET [cluster-server] => \\ ignprdappw64212 [x-aspnet-version] => 2.0.50727 [pragma] => no-cache [x-aspnetmvc-version]
=> 1.0 [set-cookie] => BoardCookieV3%5Fboards%2Eign%2Ecom=dc=no&ra=False; expires=Wed, 14-Mar-2012 01:40:19 GMT; path=/; HttpOnly [cache-control] => private [expires] => Wed, 14
Mar 2001 01:40:19 GMT [content-type] => text/html; charset=utf-8 ) [body] => [response] =>
Array ( [code] => 200 [message] => OK ) [cookies] => Array ( [0] => WP_Http_Cookie
Object ( [name] => BoardCookieV3%5Fboards%2Eign%2Ecom [value] => dc=no&ra=False
[expires] => 1331689219 [path] => / [domain] => [httponly] => ) ) )
现在。。。我想要的是从head请求返回的信息,即301或302将发生,甚至404,这样我就可以用wp\\u remote\\u来取而代之。我做错什么了吗?
仅供参考:我需要手动重定向,因为如果HTML源(代码:http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php ) 或其他背景:http://wp.leau.co/2011/03/18/handling-redirects-for-wp-favicons-with-redirects-set-to-0-with-wordpress-wp_remote_get/