toxinu / leselys

I'm Leselys, your very elegant RSS reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When opml import fails, display and log debugging information

mblakele opened this issue · comments

When an opml import fails, the server process logs it without any extra information:

127.0.0.1 - - [17/May/2013 19:30:12] "POST /api/import/opml HTTP/1.1" 500 -

Unfortunately this is not helpful for debugging. The HTTP response doesn't include anything useful either: just a generic 500 Server Error message.

This seems to be the problem feed. I suspect character escaping is at the root of it.

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
    <title>leselys cannot import this opml</title>
</head>
<body>
    <outline
        text="some text"
        title="this feed has a title"
        type="rss"
        xmlUrl="https://news.google.com/news/feeds?hl=en&amp;gl=us&amp;as_qdr=a&amp;authuser=0&amp;q=fubar+%22biz+buzz%22%7C%22foo+bar%22&amp;output=rss" htmlUrl="http://news.google.com/news?gl=us&amp;pz=1&amp;ned=us&amp;hl=en&amp;q=fubar+%22biz+buzz%22%7C%22foo+bar%22"/>
</body>
</opml>

Hi,

Thanks for your feedback!
You'll have more informations if you run leselys with --debug option.
But, I've done some work on OPML file import, if you have some time to test master branch.