Content Type disabled?

Status
Not open for further replies.

nsm_nikhil

New Member
Messages
20
Reaction score
0
Points
0
A small ajax application I am developing requires content to be returned as XML with the header Content-Type as text/xml. Now this works on my local computer. But on Exofire at 22bits.exofire.net it still sets the content-type as text/html. Are custom content types disabled for free hosting accounts?

Nikhil
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
Is the content-type is sent before any other output?
 

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
Erm, make sure that at the very start of your script, before you send any data, you do this

header("Content-type: text/xml"); (That's PHP btw).
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
ya, that needs to be BEFORE any HTML or start your script out with
HTML:
<html>
<head>
Content-type:text/xml
</head>
<body>
blah blah blah
</body>
</html>
 
Last edited:

dest581

New Member
Messages
348
Reaction score
0
Points
0
ya, that needs to be BEFORE any HTML or start your script out with
HTML:
<html>
<head>
Content-type:text/xml
</head>
<body>
blah blah blah
</body>
</html>

Don't you mean
Code:
<META HTTP-EQUIV="Content-Type" CONTENT="text/xml; >
I don't think you can just put the phrase Content-type:text/xml in the head. Correct me if wrong.
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
hah right...I sorta thought I was wrong there since I've never worked with XML. :( Sorry about that folks.
 

nsm_nikhil

New Member
Messages
20
Reaction score
0
Points
0
guys!!
that's not the problem. The script works on my local apache. When i upload it to x10 and access it doesn't. So must be a block on the server. I also created another empty script just to send a content type header and even that doesn't work. So has to be a server thing.

Nikhil
Edit:
Problem solved, I don't know how. I just tried it again and the script works. Maybe the mods did something. Anyway thanks for your suggestions.

Nikhil
 
Last edited:

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
Yeh, its the new security script. We've disabled it for the moment, upon waiting to see if i can fix it :p
 
Status
Not open for further replies.
Top