[wp-trac] Re: [WordPress Trac] #4779: Proposal for HTTP POST and REQUEST API

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 1 01:31:49 GMT 2008


#4779: Proposal for HTTP POST and REQUEST API
-------------------------------------------+--------------------------------
 Reporter:  darkdragon                     |        Owner:  jacobsantos
     Type:  enhancement                    |       Status:  new        
 Priority:  normal                         |    Milestone:  2.7        
Component:  Optimization                   |      Version:             
 Severity:  normal                         |   Resolution:             
 Keywords:  has-patch tested dev-feedback  |  
-------------------------------------------+--------------------------------
Comment (by DD32):

 Just noticed a bug in the ExtHTTP class:

 {{{
                 switch($r['method'])
                 {
                         case 'GET':
                                 $r['method'] = HTTP_METH_GET;
                                 break;
                         case 'POST':
                                 $r['method'] = HTTP_METH_POST;
                                 break;
                         case 'HEAD':
                                 $r['method'] = HTTP_METH_HEAD;
                         default:
                                 $r['method'] = HTTP_METH_GET;
                 }
 }}}

 Head will drop through and get changed to a Get.

 The default branch does not need to be last as such, its just nicer to
 have it there.. So either add a break in for the head statement, or chante
 it to:

 {{{
                         default:
                         case 'GET':
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4779#comment:40>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list