WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#11865 closed defect (bug) (invalid)

Somethimes xml response instead of html

Reported by: icns Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.1
Component: General Keywords:
Focuses: Cc:

Description

Hi,

We have a problem with our website. Sometimes for no reason we get text/xml responses instead of text/html. We have installed an clean wodpress 2.9.1 version and activated permalinks and created a few pages. Even here the problem exists. When we click around in safari/chrome/ie8 we get sometimes xml responses. Our site is available at http://test.jitscale.com

There are 2 application servers with an haproxy loadbalancer and a mysql dbserver. The website is shared over the appservers by a nfs share.

The problem mentioned below:

For example:

The requested header:
GET /solutions/products/cloud-cache/ HTTP/1.1
Host: test.jitscale.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close
X-Forwarded-For: 173.171.48.244

response header 1:
HTTP/1.1 200 OK
Date: Fri, 08 Jan 2010 14:40:23 GMT
Server: Apache
X-Powered-By: PHP/5.2.6-1+lenny2
X-Pingback: http://test.jitscale.com/xmlrpc.php[[BR]]
Set-Cookie: PHPSESSID=532d37e17684d1dce42f6f15f65ac274; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 4360
Connection: close
Content-Type: text/html; charset=UTF-8

response header 2:
HTTP/1.1 200 OK
Date: Thu, 07 Jan 2010 02:37:49 GMT
Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny2 with Suhosin-Patch
Set-Cookie: PHPSESSID=df7e3d3e651b651e76cfb447347b3fe9; path=/
Last-Modified: Mon, 04 Jan 2010 02:28:57 GMT
X-Powered-By: PHP/5.2.6-1+lenny2
X-Pingback: http://www.jitscale.com/xmlrpc.php[[BR]]
ETag: "f6909c8c692d97d9733b266d46016a7f"-gzip
Vary: Accept-Encoding
Content-Encoding: gzip
Age: 7550
Content-Length: 4569
Connection: close
Content-Type: text/xml; charset=UTF-8

Can anyone explain this?

Kind regards,

Niek Waarbroek

Change History (15)

comment:1 scribu4 years ago

  • Component changed from General to HTTP
  • Keywords dev-feedback added
  • Priority changed from high to normal

comment:2 follow-up: Denis-de-Bernardy4 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

on a load-balanced server, use either of batcache or the semiologic cache plugin, not super cache.

comment:3 in reply to: ↑ 2 icns4 years ago

  • Cc icns added
  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to Denis-de-Bernardy:

on a load-balanced server, use either of batcache or the semiologic cache plugin, not super cache.

Hi Denis,

Thanks for the quick response. But we have disabled all cache since this problem has shown up. Are there more solutions?

Kind regards,

Niek

comment:4 follow-up: dd324 years ago

Given you've got a test site, Can you revert to the default theme? See if it still occurs, If so, Switch to disabling plugins and see if one of those is causing it.

The Content-Type should always be set from the option 'html_type', Try grepping your custom code for that somewhere, it may be a plugin/theme is setting it differently depending on the request and/or browser.

comment:5 in reply to: ↑ 4 icns4 years ago

Replying to dd32:

Given you've got a test site, Can you revert to the default theme? See if it still occurs, If so, Switch to disabling plugins and see if one of those is causing it.

The Content-Type should always be set from the option 'html_type', Try grepping your custom code for that somewhere, it may be a plugin/theme is setting it differently depending on the request and/or browser.

We've installed a clean installation of wordpress with only enabled permalinks and 5 pages. Even here it occurs. So it doesn't look like a theme problem. Even with version 2.9.1 and 2.8.4 it occurs. Google chrome, safari, ie8 having this issue. We've created scripts that can send requests to this test.jitscale.com site and sometimes you can request the site 1.000.000 times with no fault. And 5 minutes later you get an error again. It's really strange.

comment:6 Denis-de-Bernardy4 years ago

When I sent a request to your page, there was WP Super Cache code as comments in the source. It seems deactivated now, though.

To me, this looks like a completely invalid ticket. I honestly can't see how WP could return a content type of text/xml for that page unless something interferes in between you and WP, i.e. haproxy, proxies, caches, etc.

As an aside, the server software is not the same on both of your servers -- one has suhosin, which can mess up a lot of things, while the other doesn't.

comment:7 Denis-de-Bernardy4 years ago

possibly related: #11060

comment:8 miqrogroove4 years ago

I agree with Denis. You should be looking at why the Server header is changing, rather than looking for a WordPress bug.

comment:9 miqrogroove4 years ago

  • Component changed from HTTP to General
  • Keywords dev-feedback removed
  • Resolution set to worksforme
  • Status changed from reopened to closed

comment:10 vibechild4 years ago

  • Cc vibechild added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I am having this exact problem. I have it with or without a custom theme. I am not using any kind of caching or load balancing. It is just a plain apache virtual host on a single server with no fancy configuration. It happens with or without plugins enabled. It is not only the server header that is changing. When the header is text/html, it is returning the web page - when it is text/xml, it is returning the rss feed for the requested page. In my testing, I have also seen it return "Content-Type: application/atom+xml; charset=UTF-8" for the same URL, and then change back to text/html a few seconds later. The content that is returned always matches the content-type header, so it is not just the header that is wrong. I also can't see how WP could return a content type of text/xml for these pages - never the less, it is doing just that. I have had this happening since at August and have tried every change to my server configuration that I can think of. I have a few observations that might help:

I have never seen it happen on the main home page, but it happens on calendar and category pages as well as article pages
It seems to return the same thing for a while and then change to another type and stick with that for a while.
I have reverted to the default theme and still see the problem
I have removed eAccellerator from my server and still see the problem
I test with curl from the command line from multiple locations to rule out web browser or proxy issues
There are no caches between me and the web server, and it happens when requested from the command line on the web server
The web server does not log anything useful, just the status code that is returned to the browser - the URL is the same regardless of what is returned.
The problem exists with or without suhosin enabled

You can see for yourself at: http://www.glutenfreemaui.com - I would be happy to work with someone to resolve this. If you really believe that it can't be a wordpress bug, the ticket should at least include a solid understanding of why it is happening before it is closed.

comment:11 ktdreyer4 years ago

  • Cc ktdreyer added

I'm unable to reproduce this on the various pages on the glutenfreemaui.com website above.

comment:12 scribu4 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Closing for now.

Feel free to re-open with steps to reproduce.

comment:13 jstephan2 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 2.9.1 to 3.2.1

Hi,

I am having the same exact issue in my website that is still not yet live yet, but can you please let me know how did you solve the issue?
I am using WP 3.2.1

I turned off the CACHE and still I have the issue.

I am getting XML response instead of HTML, those XML are completely random and couldn't able to track it.

Any help is much appriciated.

Thank you
Jo

comment:14 scribu2 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

This is not a support forum. Please post in http://wordpress.org/support/

Please don't re-open unless you can prove it's caused by WordPress instead of by a faulty server config.

comment:15 SergeyBiryukov2 years ago

  • Version changed from 3.2.1 to 2.9.1

Version number indicates when the bug was initially introduced/reported.

Note: See TracTickets for help on using tickets.