View previous topic :: View next topic |
Author |
Message |
Lawrence -
Joined: 16 Jan 2003 Posts: 207 Location: Brisbane, AU
|
Posted: Mon May 31, 2004 10:08 am Post subject: Trying to change the MIME Type for .rss... |
|
|
I'm putting together an RSS feed for my site. I've got it going perfectly using my CMS (Coranto in this case) but Abyss doesn't seem to want to change the MIME type no matter how many times I tweak it and restart the server.
This validator tells me the MIME-type for my index.rss file is still text/html, where I've set it in the abyss MIME config to be application/xml - I've also tried application/rss+xml which was the other suggested alternative.
Having tried first one, then the other (both times restarting the server) it's still reporting the wrong MIME-type.
I've investigated it a little further. In order to integrate the page header + footer with the dynamic content I had to make .rss one of the extensions processed for server-side-includes, and I think in this case Abyss is ignoring the MIME-type, instead sending text/html. I believe this is the case 'cause an .xml document was validated correctly, but when I config'd abyss to consider .rss the same as .xml, the .rss file failed validation.
Is this a bug or a feature, aprelium? =)
Any ideas? |
|
Back to top |
 |
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 01, 2004 4:21 am Post subject: |
|
|
I noticed that if you make a php file, and use the following code at the beginning:
Code: | echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n"; |
followed by
Code: | echo "<rss version=\"0.91\">\n\n"; |
and then the content, you can make a RSS feed without messing with any MIME types. _________________ Bienvenidos! |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jun 02, 2004 11:24 am Post subject: Re: Trying to change the MIME Type for .rss... |
|
|
Lawrence,
Is your .rss feed a static file or is it a script? If it is a static file, the server will set its MIME type according to the configured table. If it is a script, the server doesn't use the MIME table. It is the script that gives the MIME type of the file.
Please post here more information so that we can help you solve this problem. You can also send us your abyss.conf file and your .rss file to support@aprelium.com . _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Lawrence -
Joined: 16 Jan 2003 Posts: 207 Location: Brisbane, AU
|
Posted: Wed Jun 02, 2004 12:19 pm Post subject: |
|
|
It's not a script, it's a plain SHTML file with the extension .rss. I added rss as a server-side type so abyss will parse it, and then added rss to the MIMEtype table as application/xml. When that didn't work I appended it to the text/xml type, shown below.
Coranto, the CMS I'm using in this case, creates a static .txt file which is called from within the index.rss file using
<!-- #include virtual="rss.txt" -->
This file is not generated on-demand, it's generated when the CMS data is changed, so it's not setting any encoding at any script level.
Here's the settings:
Here's the MIMEtype as determined by the checker linked above, and in this case shown in Opera:
 |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Jun 04, 2004 10:53 am Post subject: |
|
|
Lawrence,
SSI files have text/html as their MIME type by default. This cannot be changed using the MIME types table since SSI pages are not static files (they are processed and parsed every time you request them.)
SSI is a very simple so you cannot expect too much from it. But you can easily convert your current SSI page to a script in PHP or Perl. The advantage of using a script is that you can easily fix this MIME Type issue.
Please send us your abyss.conf and your current .rss file to support@aprelium.com and we explain you how to convert this file to a script. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|