[wp-trac] [WordPress Trac] #13513: Processing HTTP Headers violates RFC 2616

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 22 20:34:50 UTC 2011


#13513: Processing HTTP Headers violates RFC 2616
-----------------------------------+-----------------------------
 Reporter:  hakre                  |       Owner:  dd32
     Type:  defect (bug)           |      Status:  accepted
 Priority:  normal                 |   Milestone:  Future Release
Component:  HTTP                   |     Version:  3.0
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+-----------------------------
Changes (by hakre):

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


Comment:

 Replying to [comment:8 dd32]:
 > After reading the spec closer, I see no need to change anything here.
 >
 > Specifically, the RFC quoted is specifying that the fields MAY be
 combined into a comma separated list(and that servers MUST present
 multiple headers in a form in which combining to a comma separated list
 will retain the original meaning), It is not dictating how a client must
 present the data given to a client (Excluding proxies, who must present
 the headers in the order given to them, and must not combine them, so as
 to preserve the meaning behind the message)

 I see and I can follow that argumentation. What has been represented as a
 comma separated list within headers is then represented as an array list
 in our PHP. I'm fine with that approach, I think that's correct after re-
 reading.

 However that does as well mean that multiple header-fields with the same
 header-name are only correct, if the specification allows a list.

 Regardless of that fact, I'm against being too strict here and compare
 against a list (for the moment) which header-names have such a property
 (list values) specified or not.

 Instead I suggest for those headers that provide multiple header-values to
 check those if they already contain commas per one array entry and
 normalize all array entries to values w/o commas so the values are
 normalized.

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


More information about the wp-trac mailing list