[wp-trac] Re: [WordPress Trac] #9395: WP_Http: add support for headers split over multiple lines

WordPress Trac wp-trac at lists.automattic.com
Tue May 5 14:23:26 GMT 2009


#9395: WP_Http: add support for headers split over multiple lines
--------------------------+-------------------------------------------------
 Reporter:  wnorris       |       Owner:                       
     Type:  defect (bug)  |      Status:  new                  
 Priority:  normal        |   Milestone:  2.8                  
Component:  HTTP          |     Version:  2.8                  
 Severity:  normal        |    Keywords:  has-patch 2nd-opinion
--------------------------+-------------------------------------------------
Changes (by hakre):

  * keywords:  needs-patch => has-patch 2nd-opinion


Comment:

 new patch. the RFC is not _that_ complex. i just decided to go into the
 normalization of the headers upfront before splitting. that makes handling
 easier afterwards.

 i was very strict to the rfc and therefore changed to propper CRLF
 tolerant parsing. that might be questionable but since this ticket was
 dedicated to the RFC voila.

 unfolding upfront makes much more sense to me. just for the quote from
 2.2:

 > HTTP/1.1 header field values can be folded onto multiple lines if the
 continuation line begins with a space or horizontal tab. All linear white
 space, including folding, has the same semantics as SP. A recipient MAY
 replace any linear white space with a single SP before interpreting the
 field value or forwarding the message downstream.

 because DD32 questioned the location status logic i kept it out.

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


More information about the wp-trac mailing list