Skip to content
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

Node HTTPS Polyfill regression #26612

Closed
irbull opened this issue Oct 28, 2024 · 1 comment · Fixed by #26613
Closed

Node HTTPS Polyfill regression #26612

irbull opened this issue Oct 28, 2024 · 1 comment · Fixed by #26613

Comments

@irbull
Copy link
Contributor

irbull commented Oct 28, 2024

Version: Deno 2.0.3

There is a regression in Deno 2.0.3 related to the Node Https Polyfill. The following worked fine in 2.0.2:

import {got} from 'npm:got';
await got.get('https://google.com').text();

After a bit of digging, it looks like it's this commit that caused the regression: afb33b3

I think this happens when the request method with 3 args is used.

@irbull
Copy link
Contributor Author

irbull commented Oct 28, 2024

And here is pure Deno snippet that can be used in a regression test:

import {request} from 'node:https';
import type {IncomingMessage} from 'node:http';

const callback = (res: IncomingMessage) => {
    console.log(res.statusCode);
};

const options = {
  hostname: 'www.google.com',
  method: 'GET',
};

const req = request(new URL('https://goole.com'), options, callback);
req.end();

Fails in 2.0.3 but works fine in 2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant