-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Parse Error: Invalid header value char #2837
Comments
When I use const https = require('https');
const req = https.request('https://secure.runescape.com/m=hiscore_oldschool/index_lite.ws?player=magnaboy', (res) => {
res.on('data', (chunk) => {
console.log(`BODY: ${chunk}`);
});
res.on('end', () => {
console.log('FINISH');
});
});
req.on('error', (e) => {
console.error(`ERROR: ${e.message}`);
});
req.end(); |
This issue relates to nodejs/node#27711. |
Also having this issue this week from Jagex's API. Thanks for the temporary fix @sapics. |
@toxxicjtag if you want to help this get fixed, drop a reply to jagexallstar here so he knows its affecting many people. https://twitter.com/JagexAllstar/status/1281615931211427844 I'm closing this now because I found the reason in another issue: nodejs/http-parser#520 (comment) |
I just don't have a twitter, hope he does look into it, i have looked into alternative options like ge-tracker for their icon files or downloading them locally at this point. |
Maybe node-fetch could be modified to pass through Node.js HTTP options like the |
They fixed this problem now btw, the cause was a bad header - more info here: nodejs/http-parser#520 (comment) |
This occurred for me with native This is on a different site than OP. OP's site works for me at the current time with or without flags and with any request library. In case it's relevant, the response has non-ASCII characters in it. |
Code:
Problem:
Fails with this error:
I tried to call this API with the exact same headers in other programming languages, in
curl
,wget
and in all browsers - and it works in everything except nodejs, that I can find. Is it possible anyone can shed some light on this and if its possibly a problem in nodejs?I've exhausted the depth of my ability to debug this error, and don't know how I should proceed. I reported it to the website owners but it doesnt seem practical or any priority at all for them to fix the root cause of whichever http header causes this.
The text was updated successfully, but these errors were encountered: