extractus / feed-extractor

Simplest way to read & normalize RSS/ATOM/JSON feed data

Home Page:https://extractor-demos.pages.dev/feed-extractor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove xml response content-type check ?

eviltik opened this issue · comments

Some response don't have content-type, see this one

https://www.hackerone.com/blog.rss

I've commented the content-type check in your code, and it's working, but ... i don't know ... perhaps you would prefer to pass an option to enable/disable content-type check ?

What do you think ?

@eviltik yes, you're right. We can add something like {acceptContentTypes: [a, b, c] }

@eviltik I just recheck RSS from hackerone, it returns application/rss+xml; charset=utf-8, that should pass our condition because it contains 'xml'. Actually it works for me without any change. But sometimes they returns header text/html; charset=UTF-8 with the same content. It seems their server issue, not our approach.

however we can remove check here, if it isn't valid xml, the error will be found by validator.

Agree with you. Another idea should be to have a "skipContentTypeCheck" ?

@eviltik hi friend, I've just released v6.0.0rc1 with many changes in the core logic, so some parts of your code no longer needed. With new implemented event-driven pattern , I think you can easily control the error and never face the problems like this one.

Please help me test to confirm if your issues have been resolved. Thank you.