Page 1 of 1

Feed not parsable due to strange first line

Posted: 11 Nov 2016, 01:28
by jmozmoz
Hello,

I would like to ask why this feed cannot be parsed by tt-rss:
https://ocw.mit.edu/rss/new/mit-newcourses.xml

If I check it with https://fakecake.org/myfeedsucks/ I get the following first lines:

Code: Select all

00006000
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="../../styles/rss.xsl"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://purl.org/rss/1.0/"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#"
         xmlns:media="http://search.yahoo.com/mrss/">   

    <channel rdf:about="https://ocw.mit.edu/courses/">
...


So there is this strange first line (00006000). I do not see it if I download the feed with curl or wget (or Firefox).

I have already contacted the administrators of the site and they seem really helpful, so if somebody could hint what the problem is, they will certainly try to fix it.

Thank you for your help.
Joachim

Re: Feed not parsable due to strange first line

Posted: 11 Nov 2016, 02:07
by jmozmoz
Update: If I use curl --raw I also see this strange 00006000 in the first line (and 00000000 in the last)

Re: Feed not parsable due to strange first line

Posted: 11 Nov 2016, 02:12
by jmozmoz
Ok. So I found these to pages which describe the same problem:
https://github.com/guzzle/guzzle/issues/1475
https://github.com/guzzle/guzzle/issues/1385

Now I do still not understand if this is a server or a client problem.

Re: Feed not parsable due to strange first line

Posted: 11 Nov 2016, 08:15
by fox
>Now I do still not understand if this is a server or a client problem.

i think it's pretty obvious tbh

Re: Feed not parsable due to strange first line

Posted: 24 Jan 2017, 23:40
by jmozmoz
My "fix" is to download these pages by curl (without raw) by a cron job and serve them to the tt-rss download client. Have I missed a more obvious way to fix this?