Bugzilla – Bug 1542
RSS News connection problem
Last modified: 2008-08-18 10:54:16 UTC
The RSS news plugin fails to connect to feeds for svn version 3210 of trunk branch. Trying to connect to the BBC predefined feed, with d_plugins and d_remotestreams enabled, this is the log message: ******************************************************************************** 2005-05-16 20:18:12.2549 RssNews: getting feed from http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml 2005-05-16 20:18:12.2552 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] 2005-05-16 20:18:12.3025 Request: GET /rss/newsonline_world_edition/front_page/rss091.xml HTTP/1.0 Accept: */* Cache-Control: no-cache User-Agent: iTunes/4.7.1 (MSWin32; SlimServer 6.1.0) Icy-MetaData: 1 Connection: close Host: news.bbc.co.uk 2005-05-16 20:18:12.3669 Response: HTTP/1.1 301 Moved Permanently 2005-05-16 20:18:12.3678 header: Date: Mon, 16 May 2005 18:18:10 GMT 2005-05-16 20:18:12.3685 header: Server: Zeus/4.2 2005-05-16 20:18:12.3697 header: Location: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml 2005-05-16 20:18:12.3702 header: Cache-Control: max-age=0 2005-05-16 20:18:12.3708 header: Expires: Mon, 16 May 2005 18:18:10 GMT 2005-05-16 20:18:12.3712 header: Content-Length: 277 2005-05-16 20:18:12.3718 header: Keep-Alive: timeout=10, max=191 2005-05-16 20:18:12.3725 header: Content-Type: text/html; charset=iso-8859-1 2005-05-16 20:18:12.3729 header: Connection: close 2005-05-16 20:18:12.3732 header: 2005-05-16 20:18:12.3733 Recieved final blank line... 2005-05-16 20:18:12.3739 Redirect to: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml 2005-05-16 20:18:12.3757 Opening connection to http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml: [news.bbc.co.uk on port 80 with path /rss/newsonline_world_edition/front_page/rss.xml with timeout 5] 2005-05-16 20:18:12.4222 Request: GET /rss/newsonline_world_edition/front_page/rss.xml HTTP/1.0 Accept: */* Cache-Control: no-cache User-Agent: iTunes/4.7.1 (MSWin32; SlimServer 6.1.0) Icy-MetaData: 1 Connection: close Host: news.bbc.co.uk 2005-05-16 20:18:17.4231 Response: 2005-05-16 20:18:17.4239 Invalid response code () from remote stream http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml 2005-05-16 20:18:17.4251 RssNews.pm failed to retrieve news from http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml. ******************************************************************************** Copying server/Slim/Player/Protocols/HTTP.pm from the 6_0_x branch to the trunk branch, slimserver connects correctly to the feed with following log message: ******************************************************************************** 2005-05-16 20:21:38.9882 RssNews: getting feed from http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml 2005-05-16 20:21:38.9886 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] 2005-05-16 20:21:39.1093 Request: GET /rss/newsonline_world_edition/front_page/rss091.xml HTTP/1.0 Host: news.bbc.co.uk User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.1.0) Accept: */* Cache-Control: no-cache Connection: close Icy-MetaData:1 2005-05-16 20:21:39.1763 Response: HTTP/1.1 301 Moved Permanently 2005-05-16 20:21:39.1772 header: Date: Mon, 16 May 2005 18:21:36 GMT 2005-05-16 20:21:39.1779 header: Server: Zeus/4.2 2005-05-16 20:21:39.1792 header: Location: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml 2005-05-16 20:21:39.1797 header: Cache-Control: max-age=0 2005-05-16 20:21:39.1804 header: Expires: Mon, 16 May 2005 18:21:36 GMT 2005-05-16 20:21:39.1809 header: --------------: --- 2005-05-16 20:21:39.1814 header: Keep-Alive: timeout=10, max=171 2005-05-16 20:21:39.1821 header: Content-Type: text/html; charset=iso-8859-1 2005-05-16 20:21:39.1826 header: Connection: close 2005-05-16 20:21:39.1829 header: 2005-05-16 20:21:39.1829 Recieved final blank line... 2005-05-16 20:21:39.1834 Redirect to: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml 2005-05-16 20:21:39.1858 Opening connection to http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml: [news.bbc.co.uk on port 80 with path /rss/newsonline_world_edition/front_page/rss.xml with timeout 5] 2005-05-16 20:21:39.2348 Request: GET /rss/newsonline_world_edition/front_page/rss.xml HTTP/1.0 Host: news.bbc.co.uk User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.1.0) Accept: */* Cache-Control: no-cache Connection: close Icy-MetaData:1 2005-05-16 20:21:39.3742 Response: HTTP/1.1 200 OK 2005-05-16 20:21:39.3749 header: Date: Mon, 16 May 2005 18:21:37 GMT 2005-05-16 20:21:39.3753 header: Server: Zeus/4.2 2005-05-16 20:21:39.3757 header: Last-Modified: Mon, 16 May 2005 17:52:48 GMT 2005-05-16 20:21:39.3837 header: Etag: "35bd-ec7f5c00" 2005-05-16 20:21:39.3841 header: Accept-Ranges: bytes 2005-05-16 20:21:39.3845 header: Content-Length: 13757 2005-05-16 20:21:39.3849 header: Cache-Control: max-age=60 2005-05-16 20:21:39.3854 header: Expires: Mon, 16 May 2005 18:22:37 GMT 2005-05-16 20:21:39.3857 header: Keep-Alive: timeout=10, max=165 2005-05-16 20:21:39.3861 header: Content-Type: application/xml 2005-05-16 20:21:39.3866 header: Connection: close 2005-05-16 20:21:39.3869 header: 2005-05-16 20:21:39.3870 Recieved final blank line... 2005-05-16 20:21:39.3871 opened stream! 2005-05-16 20:21:39.3887 Content type (xml) of http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml is being set to the contentType of: http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml ******************************************************************************** The problem is therefore related to the changes made to server/Slim/Player/Protocols/HTTP.pm in the trunk branch. I am running WinXP SP2.
The previous description turned out quite unreadable. I am currently at 6.1 svn version 3244. I am trying to connect to the predefined BBC RSS feed, but the connection fails. I have narrowed the problem down to server/Slim/Player/Protocols/HTTP.pm. Copying this file from 6.0.x branch to the trunk branch, the BBC RSS feed is downloaded correctly. Error logs can be found in the previous description.
Problem exist on SB1 and SoftSqueeze. Don't know about SB2.
For some reason, the patch below cures the problem on my system: (Please apply the patch if you do not see any side-effects) Index: server/Slim/Player/Protocols/HTTP.pm =================================================================== --- server/Slim/Player/Protocols/HTTP.pm (revision 3274) +++ server/Slim/Player/Protocols/HTTP.pm (working copy) @@ -529,8 +529,7 @@ "User-Agent: iTunes/4.7.1 ($^O; SlimServer $::VERSION)", "Icy-MetaData: 1", "Connection: close", - "Host: $host" , - $CRLF + "Host: $host" . $CRLF )); if (defined($user) && defined($password)) {
The above patch removes an extra CRLF from the request string. This extra CRLF caused problems on my system where the internet connection is not very fast. I guess others might have similar problems. Are there any reasons not to apply the patch?
What happens if you remove the ending $CRLF completely?
Then the following line (depending on the if tests) will be merged with the "Host: $host" line. I guess that is not a good idea?
Ok - I've commited a fix as subversion change 3322.
Dan, Your patch removes two $CRLF after the "Host: $host". As I indicated in comment #6, you should only remove 1. The patch does not work, probably because the request should end with a blank line to indicate the end of the request. With your patch, the blank line is not present. I will reopen the bug, please fix. Patch for latest svn version: Index: server/Slim/Player/Protocols/HTTP.pm =================================================================== --- server/Slim/Player/Protocols/HTTP.pm (revision 3327) +++ server/Slim/Player/Protocols/HTTP.pm (working copy) @@ -529,7 +529,7 @@ "User-Agent: iTunes/4.7.1 ($^O; SlimServer $::VERSION)", "Icy-MetaData: 1", "Connection: close", - "Host: $host", + "Host: $host" . $CRLF )); if (defined($user) && defined($password)) {
Really fixed now. :)
This bug was marked resolved in Slimserver 6.1, which is several versions ago. If you're still seeing this bug, please re-open it. Thanks!