Avoid requiring the _http_common module
jancurn opened this issue · comments
Otherwise, the package is not usable from Electron. See apify/crawlee#522
The module is only needed for isInvalidHeader()
in https://github.com/apifytech/proxy-chain/blob/master/src/tools.js#L2
Double-check that the HTTP header validation is compatible with Node.js' header validation (they change HTTP parser in version 12 I think, which has slightly different behavior), perhaps in unit tests we could test against Node's internal methods too, just to be sure.