[wp-trac] [WordPress Trac] #54225: Request header key case inconsistencies

WordPress Trac noreply at wordpress.org
Sun May 29 16:58:46 UTC 2022


#54225: Request header key case inconsistencies
-------------------------------------+---------------------
 Reporter:  johnjamesjacoby          |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  HTTP API                 |     Version:  2.7
 Severity:  normal                   |  Resolution:
 Keywords:  2nd-opinion needs-patch  |     Focuses:  docs
-------------------------------------+---------------------

Comment (by SergeyBiryukov):

 Replying to [ticket:54225 johnjamesjacoby]:
 > Possible code/docs improvements here include:
 > * standardizing when core uses which case
 > * explicitly stating that header key parameters are case-insensitive

 Looking at the core files (excluding external libraries):

 * `Content-Type`
  * 89 instances of `Content-Type`
  * 27 instances of `content-type`
  * 9 instances of `Content-type`
 * `Content-Disposition`
  * 13 instances of `Content-Disposition`
  * 2 instances of `content-disposition`
 * `Content-MD5`
  * 1 instance of `Content-MD5`
  * 1 instance of `content-md5`

 These numbers include DocBlocks and inline comments, so may not be 100%
 accurate, but should work as a quick overview. It looks like we can
 standardize on `Content-Type`, `Content-Disposition`, `Content-Type`, etc.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54225#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list