Weird behaviour of Lasso's RSS parser

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird behaviour of Lasso's RSS parser

CoMedia
Hi all,

I'm facing some very weird behaviour of Lasso's RSS tags (OS X Server 10.5, Lasso 8.5.5). When I'm using the rss_datasource tag, for instance with http://rss.cnn.com/rss/edition.rss, the newsitems parsed by Lasso are about one day old. Using the very same URL in Safari or any other RSS interpreter, todays news is shown.

I have also tried this with some old code from the early days of RSS, long before you could treat a RSS feeds as a data source. Same thing. So it must be something deep deep inside Lasso that is screwing things up.

Is anyone seeing the same behaviour? And more important: how can i fix it?

Checked: date, time and timezone of the server are OK. I have even restarted the server. Checked with several other RSS feeds. All going mad.

Best regards, - Alfred

Reply | Threaded
Open this post in threaded view
|

Re: Weird behaviour of Lasso's RSS parser

CoMedia
CoMedia wrote
I'm facing some very weird behaviour of Lasso's RSS tags (OS X Server 10.5, Lasso 8.5.5). When I'm using the rss_datasource tag, for instance with http://rss.cnn.com/rss/edition.rss, the newsitems parsed by Lasso are about one day old. Using the very same URL in Safari or any other RSS interpreter, todays news is shown.

I have also tried this with some old code from the early days of RSS, long before you could treat a RSS feeds as a data source. Same thing. So it must be something deep deep inside Lasso that is screwing things up.

Is anyone seeing the same behaviour? And more important: how can i fix it?

Checked: date, time and timezone of the server are OK. I have even restarted the server. Checked with several other RSS feeds. All going mad.
No takers?

Can someone try this code and compare with a RSS reader, Firefox or Safari? I'm consistently getting yesterday's news when using Lasso. And yes, the sortorder is descending, so the latest news should get on top.

<?LassoScript
        Inline(
                -Search,
                -Host=(:-datasource='rss_datasource'),
                -Database='http://rss.cnn.com/rss/edition.rss',
                -SortField='pubDate', -SortOrder='descending',
                -MaxRecords='all');
                Records;
                        Field('title') + ' (' + Field('pubdate') +')<br />\r';
                /Records;
        /Inline;
?>

- Alfred
Reply | Threaded
Open this post in threaded view
|

Re: Weird behaviour of Lasso's RSS parser

Fletcher Sandbeck-3
In reply to this post by CoMedia
On 11/21/08 at 7:17 AM, [hidden email] (CoMedia) wrote:

>Can someone try this code and compare with a RSS reader, Firefox or Safari?
>I'm consistently getting yesterday's news when using Lasso. And yes, the
>sortorder is descending, so the latest news should get on top.
>
><?LassoScript
>Inline(
>-Search,
>-Host=(:-datasource='rss_datasource'),
>-Database='http://rss.cnn.com/rss/edition.rss',
>-SortField='pubDate', -SortOrder='descending',
>-MaxRecords='all');
>Records;
>Field('title') + ' (' + Field('pubdate') +')<br />\r';
>/Records;
>/Inline;
>?>

This is an interesting issue.  Apparently, CNN, or possibly
FeedBurner which they use to construct their feeds,
discriminates against unknown user agents.
If the User-Agent is set to "Mozilla" then it looks like the
up-to-date feeds come back.

There is a new version of the RSS_Datasource.Lasso file with
this change here.  The only change is a line adding
-sendmimeheaders to the parameters passed to the [Include_URL] tag.

<http://download.lassosoft.com/pub/TotW/TotW_9334.zip>

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Weird behaviour of Lasso's RSS parser

CoMedia
Fletcher Sandbeck-3 wrote
This is an interesting issue.  Apparently, CNN, or possibly FeedBurner which they use to construct their feeds, discriminates against unknown user agents.
If the User-Agent is set to "Mozilla" then it looks like the up-to-date feeds come back.

There is a new version of the RSS_Datasource.Lasso file with  this change here.  The only change is a line adding -sendmimeheaders to the parameters passed to the [Include_URL] tag.

<http://download.lassosoft.com/pub/TotW/TotW_9334.zip>

[fletcher]
That fixes it, Fletcher! I'm pretty sure your guesses are right: I have checked this discriminatory behaviour with CNN, FeedBurner, and VersionTracker (among others), while most of the smaller sites appear to have no problems. With the new RSS_Datasource tag everything is OK again. I'll change it a bit so I optionally can use my own User Agent (which can come in handy for some special feeds), with Mozilla as a default. Thanks for fixing this so soon!

- Alfred