[wp-trac] [WordPress Trac] #11555: HTTP Streams transport returns duplicate headers during redirections

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 22 07:17:45 UTC 2009


#11555: HTTP Streams transport returns duplicate headers during redirections
--------------------------+-------------------------------------------------
 Reporter:  dd32          |       Owner:  dd32     
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0      
Component:  General       |     Version:  2.9      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
Changes (by dd32):

  * keywords:  needs-patch => has-patch


Comment:

 Attahed patch takes an array such as this, returned from $wraper_data, and
 pulls out the final group of headers:

 From:
 {{{
 array(23) {
   [0]=>
   string(18) "HTTP/1.1 302 Found"
   [1]=>
   string(35) "Date: Tue, 22 Dec 2009 07:15:43 GMT"
   [2]=>
   string(39) "Server: Apache/2.2.14 (Win32) PHP/5.3.0"
   [3]=>
   string(23) "X-Powered-By: PHP/5.3.0"
   [4]=>
   string(29) "Location: /redirect/?rt=2&r=1"
   [5]=>
   string(18) "Content-Length: 15"
   [6]=>
   string(17) "Connection: close"
   [7]=>
   string(23) "Content-Type: text/html"
   [8]=>
   string(18) "HTTP/1.1 302 Found"
   [9]=>
   string(35) "Date: Tue, 22 Dec 2009 07:15:43 GMT"
   [10]=>
   string(39) "Server: Apache/2.2.14 (Win32) PHP/5.3.0"
   [11]=>
   string(23) "X-Powered-By: PHP/5.3.0"
   [12]=>
   string(29) "Location: /redirect/?rt=2&r=2"
   [13]=>
   string(18) "Content-Length: 15"
   [14]=>
   string(17) "Connection: close"
   [15]=>
   string(23) "Content-Type: text/html"
   [16]=>
   string(15) "HTTP/1.1 200 OK"
   [17]=>
   string(35) "Date: Tue, 22 Dec 2009 07:15:43 GMT"
   [18]=>
   string(39) "Server: Apache/2.2.14 (Win32) PHP/5.3.0"
   [19]=>
   string(23) "X-Powered-By: PHP/5.3.0"
   [20]=>
   string(18) "Content-Length: 24"
   [21]=>
   string(17) "Connection: close"
   [22]=>
   string(23) "Content-Type: text/html"
 }
 }}}

 To:
 {{{
 array(7) {
   [0]=>
   string(15) "HTTP/1.1 200 OK"
   [1]=>
   string(35) "Date: Tue, 22 Dec 2009 07:16:53 GMT"
   [2]=>
   string(39) "Server: Apache/2.2.14 (Win32) PHP/5.3.0"
   [3]=>
   string(23) "X-Powered-By: PHP/5.3.0"
   [4]=>
   string(18) "Content-Length: 24"
   [5]=>
   string(17) "Connection: close"
   [6]=>
   string(23) "Content-Type: text/html"
 }
 }}}

 Whilst the headers of the in-between requests can be useful sometimes, The
 WordPress HTTP API currently doesnt expose them, so discarding these is
 "OK"

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


More information about the wp-trac mailing list