Opened 15 years ago
Closed 11 years ago
#11060 closed defect (bug) (worksforme)
Content-Type of XML feeds is misstated as 'text/html'
Reported by: | celejar0 | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8.6 |
Component: | Feeds | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
I access blog XML feeds via a caching proxy (squid). The Content-Type in the HTTP response headers is initially reported correctly as 'text/xml', but when a subsequent request is made and the object is stale, wordpress sometimes returns a '304 Not Modified', but also incorrectly re-characterizes the Content-Type as 'text/html'. Example:
HTTP/1.0 304 Not Modified X-Pingback: http://wordpress.org/development/xmlrpc.php Last-Modified: Sat, 31 Oct 2009 21:28:00 GMT ETag: "a4aa82a49dbe294617210eb367fa0997" Content-type: text/html Date: Mon, 02 Nov 2009 01:25:17 GMT Server: LiteSpeed Connection: close
I've seen this on 'wordpress.org/development/feed' (LiteSpeed), on a wordpress.com hosted blog (nginx), and on an independent site running wordpress (Apache).
Attachments (1)
Change History (5)
#3
@
15 years ago
- Component changed from HTTP to Feeds
- Keywords has-patch needs-testing added
In my testing, Apache/PHP5.3 ignore the content-type header for 304 responses.
Try the attached patch, and see if it works for you.
#4
@
11 years ago
- Milestone Future Release deleted
- Resolution set to worksforme
- Status changed from new to closed
No reporter feedback in 4 years, unable to duplicate.
This appears as if it may have been something in Squid reporting an incorrect content-type, I've been unable to duplicate it, and can't see anything in WordPress that could cause it.
See also: #11865