TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
919 stars 239 forks source link

Should not throw exception about invalid header #162

Closed youginil closed 1 year ago

youginil commented 1 year ago

https://github.com/TooTallNate/proxy-agents/blob/63adbcefdb4783cc67c0eb90200886b4064e8639/packages/https-proxy-agent/src/parse-proxy-response.ts#L74-L79

The exception cannot be caught, and it affects user program, I think ignoring it is a decent solution.

TooTallNate commented 1 year ago

Looks like Node's built-in HTTP server will just silently drop those requests. I suppose we should do the same here.

realbillwong commented 1 year ago

https://github.com/TooTallNate/proxy-agents/blob/63adbcefdb4783cc67c0eb90200886b4064e8639/packages/https-proxy-agent/src/parse-proxy-response.ts#L74-L79

The exception cannot be caught, and it affects user program, I think ignoring it is a decent solution.

Hey, have you been able to find a way to catch the error?

youginil commented 1 year ago

@realbillwong No

youginil commented 1 year ago

@realbillwong Maybe this will helps you. https://github.com/nodejs/node/issues/27711#issuecomment-494049324

TooTallNate commented 1 year ago

Should be fixed in https-proxy-agent@6.2.1.