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

No need set hostname when hostname is a IP Address. #52707

Closed
wants to merge 1 commit into from

Conversation

mount33
Copy link

@mount33 mount33 commented Jun 15, 2023

When hostname is IP Address SSL_set_tlsext_host_name cause TLS handshake failed.

Bug #49183

@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/309620

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@mraleph
Copy link
Member

mraleph commented Jun 15, 2023

/cc @brianquinlan

@devoncarew
Copy link
Member

Assigning a reviewer here to remove this from our triage queue (the review itself should happen on the gerrit CL).

@brianquinlan
Copy link
Contributor

Hey @mount33

I made a comment at https://dart-review.googlesource.com/c/sdk/+/309620

@mount33
Copy link
Author

mount33 commented Jun 27, 2023

Hey @mount33

I made a comment at https://dart-review.googlesource.com/c/sdk/+/309620

Just make a request to https://1.1.1.1, you will reproduce the problem.

import 'dart:convert';
import 'dart:io';

void main() async {
  final req = await HttpClient().getUrl(Uri.parse('https://1.1.1.1/'));
  final resp = await req.close();
  final content = await resp.transform(utf8.decoder).join();
  print(content);
}

@mount33 mount33 closed this Jun 27, 2023
@mount33 mount33 reopened this Jun 27, 2023
@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/309620 has been updated with the latest commits from this pull request.

1 similar comment
@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/309620 has been updated with the latest commits from this pull request.

@mraleph
Copy link
Member

mraleph commented Oct 19, 2023

@brianquinlan ping? should this PR be closed?

@brianquinlan
Copy link
Contributor

Hey @mount33,

I ran the script that you suggested with Dart 3.1.0 (and Dart 3.0 and Dart 2.9) and got the same output as curl i.e.

<!DOCTYPE html><html theme="light" lang="en-US" prefix="og: http://ogp.me/ns#"><head><meta charset="utf-8"><title>1.1.1.1 — The free app that makes your Internet faster.</title>
...
</path></svg></div></div></a></div><script type="text/javascript" src="/site-154bec96cd692fe98c89.js"></script></body></html>

What platform are you using, maybe the effect is platform-specific?

@mount33
Copy link
Author

mount33 commented Oct 20, 2023

Hey @mount33,

I ran the script that you suggested with Dart 3.1.0 (and Dart 3.0 and Dart 2.9) and got the same output as curl i.e.

<!DOCTYPE html><html theme="light" lang="en-US" prefix="og: http://ogp.me/ns#"><head><meta charset="utf-8"><title>1.1.1.1 — The free app that makes your Internet faster.</title>
...
</path></svg></div></div></a></div><script type="text/javascript" src="/site-154bec96cd692fe98c89.js"></script></body></html>

What platform are you using, maybe the effect is platform-specific?

@brianquinlan I previously tested on Windows 11 x64 with Flutter SDK 3.7.11. Perhaps it has already been fixed. I apologize for wasting your valuable time.

@mount33 mount33 closed this Oct 20, 2023
@brianquinlan
Copy link
Contributor

I tested this with Dart 3.1 on Windows and could not repro.

No need to apologize! Thank you so much for the effort!

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 this pull request may close these issues.

None yet

4 participants