`HPE_INVALID_HEADER_TOKEN` error due to `Invalid header value char`
EpsilonTal opened this issue · 0 comments
EpsilonTal commented
Hello,
Following the readme file, using
NodeJS 12
and
"rss-parser": "^3.12.0"
I start my app using
nodemon nodemon --http-parser=legacy app/
The content language is 'Hebrew'
I receive the following error, after initializing the parser
:
let Parser = require('rss-parser');
...
let parser = new Parser();
let feed = await parser.parseURL('https://..../rss/xml.xml');
console.log(feed.title);
feed.items.forEach(item => {
console.log(item.title + ':' + item.link)
});
Error:
Error: Parse Error
at TLSSocket.socketOnData (_http_client.js:452:22)
at TLSSocket.emit (events.js:196:13)
at addChunk (_stream_readable.js:290:12)
at readableAddChunk (_stream_readable.js:271:11)
at TLSSocket.Readable.push (_stream_readable.js:226:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17) {
bytesParsed: 707,
code: 'HPE_INVALID_HEADER_TOKEN',
reason: 'Invalid header value char'
}
Does the rss-parser
work with node12?
Any header you might suggest I should add to the parser?
UPDATE -> After testing with another RSS such as https://www.reddit.com/.rss
, it worked.
So I guess the response language does matter.
Thanks.