[solved] XML interpreted as HTML (FireFox)

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

[solved] XML interpreted as HTML (FireFox)

Post by MarK (CZ) »

Hi all :)

I need to help with this: I am trying to output some XML out of php. It works fine but the strange thing I can't fix is that FireFox still works with the page as HTML instead of XML. In IE it works fine.
When I save the source into a file, it works fine...

Example - interpreted as text/html
but why for ex. devnet rss is interpreted nicely as text/xml?

I must be doing some stupid mistake but I cannot see it :?
Last edited by MarK (CZ) on Mon Jul 10, 2006 8:26 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Your response headers

Code: Select all

Date: Tue, 11 Jul 2006 01:08:21 GMT
Server: Apache/2.0.48 (Unix)
Set-Cookie: PHPSESSID=##HASH##; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Tue, 11 Jul 2006 01:08:21 GMT
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

200 OK
Our response headers:

Code: Select all

Date: Tue, 11 Jul 2006 01:09:24 GMT
Server: Microsoft-IIS/5.0
X-Powered-By: PHP/4.4.2
Keep-Alive: timeout=20, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/xml

200 OK
Notice the differences? ;)
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

I'm stupid... :(
This is how one can end up after a long break with programming... :(

Thanks!
Post Reply