Page 1 of 1

[SOLVED] To get rss feed to validate out of CGFeedMaker

Posted: Fri Apr 05, 2013 8:45 pm
by postiffm
I get this from the feed validator:

Feeds should not be served with the "text/html" media type [help]
Your feed appears to be encoded as "UTF-8", but your server is reporting "US-ASCII" [help]

I believe that AddType application/rss+xml .rss

in .htaccess doesn't work to solve the first problem because the .rss file is not static.

So...where/how do I change the Content-Type and encoding in the header to get these warnings to go away? I messed around with the feed's template but I cannot get it right.

[I have no problem with the pretty_url issue because I access the .rss file with the same name that {$feed_url} reports back.]

Thanks,

Matt

Re: To get rss feed to validate out of CGFeedMaker

Posted: Wed Apr 10, 2013 12:08 pm
by postiffm
By the way,

http://www.rexswain.com/cgi-bin/httpview.cgi

reports that the http header for my CGFeedMaker rss feed is

Content-Type:·text/html


Some other blogs I looked at:

http://www.aei-ideas.org/channel/carpe-diem/feed/
Content-Type:·text/xml;·charset=UTF-8

http://feeds.feedburner.com/cmsmadesimple/blog
Content-Type:·text/html;·charset=UTF-8

http://feeds.feedburner.com/TheologicallyDriven
Content-Type:·text/html;·charset=UTF-8

Re: To get rss feed to validate out of CGFeedMaker

Posted: Wed Apr 10, 2013 7:57 pm
by staartmees
to solve the problem with Content-Type:·text/html, you have to adapt your .htaccess-file by adding

Code: Select all


AddType application/rss+xml .rss


Re: To get rss feed to validate out of CGFeedMaker

Posted: Wed Apr 10, 2013 8:12 pm
by postiffm
Thanks--but it doesn't seem to help.

I already had
AddType application/rss+xml rss
in my .htaccess. I changed it to what you suggested
AddType application/rss+xml .rss
with no change in the text/html content-type returned for that page.

Also, I had already verified with my host that rss was in the server's /etc/httpd/conf/mime.types file:

application/rss+xml rss

Any other ideas?

Re: To get rss feed to validate out of CGFeedMaker

Posted: Fri Apr 12, 2013 12:22 pm
by postiffm
I commented out the line that sets the content-type to text/html and have been running my site for a few days with no apparent change in behavior.

Re: To get rss feed to validate out of CGFeedMaker

Posted: Tue May 14, 2013 2:08 am
by postiffm
A new version of CGFeedMaker, 1.0.19, solved my problem. In action.default.php it sets the content-type to "text/xml" which is good enough to get the feed to validate properly.