Bug 3242 - If an RSS feed that has moved is requested, SlimServer fails to retrieve the file from the new location.
: If an RSS feed that has moved is requested, SlimServer fails to retrieve the ...
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 6.2.2
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Andy Grundman
:
Depends on: 3309
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-04 15:19 UTC by Christopher Key
Modified: 2009-09-08 09:29 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
Patch to RssNews.pm to use LWP (1.02 KB, patch)
2006-04-05 15:27 UTC, Christopher Key
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Key 2006-04-04 15:19:47 UTC
If an RSS feed that has moved is requested, SlimServer fails to retrieve the file from the new location.  For example, the BBC news RSS feed has moved from:
 
http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml

to:
http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml



With d_remotestream enabled, the log says:

2006-04-04 23:16:58.4236 Opening connection to http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml: [news.bbc.co.uk on port 80 with path /rss/newsonline_world_edition/front_page/rss091.xml with timeout 5]
2006-04-04 23:16:58.4597 Request: GET /rss/newsonline_world_edition/front_page/rss091.xml HTTP/1.0
Accept: */*
Cache-Control: no-cache
User-Agent: iTunes/4.7.1 (Windows; N; Windows XP; 586; EN; cp1252) SlimServer/6.2.2/6811
Icy-MetaData: 1
Connection: close
Host: news.bbc.co.uk

2006-04-04 23:16:58.5060 Response: HTTP/1.1 301 Moved Permanently
2006-04-04 23:16:58.5074 header: Date: Tue, 04 Apr 2006 22:15:01 GMT
2006-04-04 23:16:58.5083 header: Server: Zeus/4.2
2006-04-04 23:16:58.5110 header: Location: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
2006-04-04 23:16:58.5120 header: Cache-Control: max-age=0
2006-04-04 23:16:58.5133 header: Expires: Tue, 04 Apr 2006 22:15:01 GMT
2006-04-04 23:16:58.5145 header: Content-Length: 277
2006-04-04 23:16:58.5170 header: Keep-Alive: timeout=10, max=156
2006-04-04 23:16:58.5183 header: Content-Type: text/html; charset=iso-8859-1
2006-04-04 23:16:58.5196 header: Connection: close
2006-04-04 23:16:58.5203 header: 
2006-04-04 23:16:58.5204 Recieved final blank line...
2006-04-04 23:16:58.5211 Redirect to: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
2006-04-04 23:16:58.5234 ERROR: Slim::Player::Protocols::HTTP::request: Couldn't retrieve track object for: [http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml]
Comment 1 KDF 2006-04-04 15:27:15 UTC
see bug 2693
Comment 2 Christopher Key 2006-04-04 15:51:30 UTC
Bug 2693 deals with the fact that the RSS feeds have moved.  This bug deals with SlimServer not being able to understand the redirect responses that it receives.

Although I appreciate that it's not a major priority, is it not desirable to have SlimServer understand redirections, so that a software update / reconfiguration is not required whenever an RSS feed gets moved.  Perhaps an optimal behaviour would be to have SlimServer retrieve the file from the new location, and to update its configuration whenever a 'Moved Permanently' is encountered.
Comment 3 Blackketter Dean 2006-04-04 17:19:21 UTC
Proper support for redirection is a requirement, not an enhancement.
Comment 4 KDF 2006-04-04 17:38:34 UTC
then, perhaps bug 2693 should be considered irrelevant (at least the bbc news part of it) in that the remaining issue is really just what this bug report is about.  new default is fixed, but existing setups would need this redirect.
Comment 5 Christopher Key 2006-04-05 15:27:19 UTC
Created attachment 1182 [details]
Patch to RssNews.pm to use LWP

This patches RssNews.pm to use LWP instead of the SlimServer HTTP client.  LWP follows redirects correctly.
Comment 6 KDF 2006-04-05 15:48:24 UTC
Unfortunately, LWP blocks, and could cause audio dropouts if the data takes too long.  RSS is in line to be moved to using AsyncHTTP.  I'm not sure how well that handles redirects at this point. I haven't even looked at it myself, since I have assumed that Andy is working on it as part of the other recent conversions.
Comment 7 Christopher Key 2006-04-05 16:10:35 UTC
Ah, I knew there had to be a reason that LWP wasn't in use.  I've had a quick look throught the AsyncHTTP code and can't find anything that suggests that it handles redirects itself, although if it's a work in progress, I presume it'll appear in due course.  If RssNews is due to be moved over to AsyncHTTP, then this bug presumably doesn't need any specific attention, as it'll be fixed during the course of those events.
Comment 8 Blackketter Dean 2006-04-23 08:16:12 UTC
Andy, you are handling redirection in the async http library now, right?
Comment 9 Andy Grundman 2006-04-28 17:43:37 UTC
The new RssNews plugin supports redirection properly via SimpleAsyncHTTP.
Comment 10 Andy Grundman 2006-05-12 06:23:22 UTC
*** Bug 3414 has been marked as a duplicate of this bug. ***
Comment 11 Chris Owens 2006-06-12 16:39:42 UTC
Verified fixed in SlimServer Version: 6.3.0 - 7895 - Windows XP - EN - cp1252
Comment 12 Chris Owens 2006-06-27 14:21:35 UTC
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.