forwardemail / forwardemail/superagent

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Host"]

Open
#1,639 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I'm using superagent as a rookie programer, but get stuck on below issue, please shed some light on it, many thanks!
Due to some reasons, we still using old version of Election, maybe this is not the root cause.

Electon: v4.x,
Node.js: v8.x
Superagent: v6.1.0

Site:
https://www.a1distribution.ca/fr
Links: ( links is from home page )
http://www.a1imports.ca/fr/Page/Contact
http://www.a1imports.ca/fr/Base/ChangeLanguage
http://www.a1imports.ca/fr/Catalog?attid=U%E2%80%A0h%C2%A4%24%7D%21c%E2%82%AC%E2%80%A2
http://www.a1imports.ca/fr/Catalog?attid=U%E2%80%A0h%C2%A4%24%7D%40%7D%E2%80%A0o

Code snipet:
// -----------------------------------------------
let errorCount = 0;
for (let i=0; i= 3) break;
}
}

// -----------------------------------------------
process.on('uncaughtException', function(err) {
loggerSys.error(err);
app.exit(900);
});

//--------------------- log -------------------
[2021-09-07 15:50:25.209] [ERROR] sys - TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Host"]
at ClientRequest.setHeader (_http_outgoing.js:473:3)
at new ClientRequest (_http_client.js:213:12)
at Object.request (https.js:280:10)
at Request.request (C:\Workspace\Electron\cusdig\node_modules\superagent\lib\node\index.js:795:18)
at Request.end (C:\Workspace\Electron\cusdig\node_modules\superagent\lib\node\index.js:951:8)
at Request._redirect (C:\Workspace\Electron\cusdig\node_modules\superagent\lib\node\index.js:552:8)
at ClientRequest. (C:\Workspace\Electron\cusdig\node_modules\superagent\lib\node\index.js:1020:21)
at Object.onceWrapper (events.js:273:13)
at ClientRequest.emit (events.js:182:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:555:21)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.