rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: JoeD on September 13, 2008, 10:11:51 PM

Title: How to deliver an RSS feed
Post by: JoeD on September 13, 2008, 10:11:51 PM
Hi

I try to deliver a valid RSS feed with HFS (both latest official and 202beta) but my IE7 will not detect it as an RSS feed but make a download.

For testing I took the rss.xml file from my web-site (which is hosted on an apache server at an ISP) and IE7 will correctly show it as feed.

I modified the HTML pattern with the <link> so the FEED ICON would correctly lit in IE7. I also added the MIME-type to the list. I tried "text/xml" and "application/xml" and "application/rss+xml" but nothing would work. IE7 still makes a download and does not show the feed.

I took my IIS7, placed the rss.xml file and created the MIME-type and the feed would show in IE7. I also took the OmniSecure 3.0 web-server placed the rss.xml file and added the MIME-type and IE7 would show the feed.

So I guess, that something in HFS.EXE is not delivering the file with the correct header to IE7 so it would not detect it as a valid feed.
It can not be the rss.xml file itself, because it works in IIS7, OmniSecure and Apache correctly.

Any guesses?

Joe
Title: Re: How to deliver an RSS feed
Post by: Foggy on September 14, 2008, 08:28:56 AM
I couldn't get it to work either, I am thinking that maybe the mime types are broken because I managed to create a work around in the template by using the mime macro and loading the contents of the xml file into the page.

this is the code I used. to use it; paste it at the end of your template. Then save the xml file in the same folder as your hfs executable and call it "rss.xml" and then point your browser to http://your_address/~rss.

Code: [Select]
[rss]
{.mime|text/xml.}{.load|rss.xml.}

BTW I did this with HFS #202 and Firefox 3.
Title: Re: How to deliver an RSS feed
Post by: Rarst on September 14, 2008, 09:42:21 AM
Validate feed with http://validator.w3.org/feed/ from sources where it works and where it doesn't. May show the problem.

Don't have IE7 installed to test myself.
Title: Re: How to deliver an RSS feed
Post by: Foggy on September 14, 2008, 11:07:46 AM
just tried it with the validator and both passed. ie. My template method and the rss.xml file in the vfs.

So I tried in firefox again and now they both seem to be working without a problem, only thing different is the rss.xml file just loads into firefox like a standard xml file whereas /~rss shows like a rss feed.

I think that hfs may have needed to be restarted for the changes to the mime types took effect.
Title: Re: How to deliver an RSS feed
Post by: Joe on September 14, 2008, 11:09:23 AM
Tried the macro, but it doe not work either. At least in IE7. Still the download window opens.

The feed is otherwise okay. IE7 shows it flawlessly from all the other web-servers.

I also think the MIME-Type are broken.

Maybe I try wireshark to look at the raw packets from HFS and from IIS7 to see the difference if no one comes up with an idea.

Joe
Title: Re: How to deliver an RSS feed
Post by: rejetto on September 14, 2008, 01:37:40 PM
i will test ASAP
Title: Re: How to deliver an RSS feed
Post by: rejetto on September 14, 2008, 03:20:43 PM
found the reason: you must also correctly set
menu -> other options -> open directly in browser