[wp-trac] [WordPress Trac] #24182: WP_Http_Fsockopen fails when requesting an IP based URL with an explicit Host header

WordPress Trac noreply at wordpress.org
Wed Apr 24 22:52:19 UTC 2013


#24182: WP_Http_Fsockopen fails when requesting an IP based URL with an explicit
Host header
--------------------------+------------------------------
 Reporter:  friedcell     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP          |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by friedcell):

 I fixed it locally with
 {{{
 if ( ip2long($arrURL['host']) === false && !is_array($r['headers']) ||
 !array_key_exists("Host", $r['headers'])) {
 }}}
 around the if/else that sets the Host header from $arrURL['host'] but I'm
 not sure that handles all the cases...

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


More information about the wp-trac mailing list