nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.46k stars 160 forks source link

feat: Support redirections #341

Closed guibwl closed 8 months ago

guibwl commented 8 months ago

Some registries will redirect and return with 302;

It will cause corepack error;

Internal Error: Server answered with HTTP 302

This PR helps redirections supported when a request responds with a 302 or 301 status code.

Associated with:
https://github.com/nodejs/corepack/issues/302 https://github.com/nodejs/corepack/issues/336

guibwl commented 8 months ago

Can we add tests?

Sure, let me add some.

guibwl commented 8 months ago

Can we add tests?

done

guibwl commented 8 months ago

@aduh95 Hi, can I ask when will this feature be released?