Opened 18 years ago
Closed 18 years ago
#3545 closed defect (bug) (fixed)
Content-Type header case sensitive
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.0.6 |
Component: | General | Keywords: | headers mime type http wp-cache has-patch |
Focuses: | Cc: |
Description
Wordpress 2.0.6 (and below) use of the Content-Type header is inconsistent. In most places it sends "Content-Type" but in some, particularly the RSS templates, it sends "Content-type" (note the lowercase 't')
RFC2616 implies that this header is case sensitive.
I came across this whilst using the WP-Cache plugin. It is strict about the header case and ignores the RSS feed content types, overriding it with it's own default of html/text. So WP-Cached RSS feeds end up with the wrong content-type, breaking some feed readers.
Attachments (2)
Change History (10)
#2
@
18 years ago
- Milestone changed from 2.0.7 to 2.2
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
#3
@
18 years ago
Doh, I see now that I was looking at only one section of the RFC (duh). It does state that they are case-insensitive so this is definitely a bug in WP-Cache (which I've reported). Thanks Mark.
#5
@
18 years ago
- Keywords needs-patch added; has-patch removed
Doesn't apply cleanly. Feed files moved.
RFC2616 explicitly says that HTTP headers are case-insensitive. That said, it doesn't hurt us to capitalize them as they are presented in the RFC. Well-behaved clients won't care and lazy clients will more likely than not use the capitalization that the RFC uses.
The only problem I see is that some of the instances in WP of "Content-type" are in external libraries like Snoopy or TinyMCE. Changing those may present an added burden for maintenance.
At any rate, 2.2 territory.