Make WordPress Core

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's profile celejar0 Owned by: dd32's profile dd32
Milestone: Priority: normal
Severity: normal Version: 2.8.6
Component: Feeds Keywords: has-patch needs-testing
Focuses: Cc:


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
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 '' (LiteSpeed), on a hosted blog (nginx), and on an independent site running wordpress (Apache).

Attachments (1)

11060.diff (1.4 KB) - added by dd32 14 years ago.

Download all attachments as: .zip

Change History (5)

#1 @celejar0
15 years ago

  • Cc celejar0 added

#2 @Denis-de-Bernardy
14 years ago

  • Milestone changed from Unassigned to Future Release
  • Version set to 2.8.6

See also: #11865

#3 @dd32
14 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.

14 years ago

#4 @dd32
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.

Note: See TracTickets for help on using tickets.