Make WordPress Core

Opened 17 years ago

Closed 13 years ago

#11060 closed defect (bug) (worksforme)

Content-Type of XML feeds is misstated as 'text/html'

Reported by: celejar0 Owned by: dd32
Priority: normal Milestone:
Component: Feeds Version: 2.8.6
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

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)

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

Download all attachments as: .zip

Change History (5)

#1 @celejar0
17 years ago

  • Cc celejar0 added

#2 @Denis-de-Bernardy
17 years ago

  • Milestone UnassignedFuture Release
  • Version2.8.6

See also: #11865

#3 @dd32
17 years ago

  • Component HTTPFeeds
  • 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.

@dd32
17 years ago

#4 @dd32
13 years ago

  • Milestone Future Release
  • Resolutionworksforme
  • Status newclosed

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.