GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: add missing to_ascii method in dns queries · nodejs/node@325441a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • cares_wrap.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/cares_wrap.cc‎

Copy file name to clipboardExpand all lines: src/cares_wrap.cc
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,9 +1414,11 @@ static void Query(const FunctionCallbackInfo<Value>& args) {
14141414
Local<String> string = args[1].As<String>();
14151415
auto wrap = std::make_unique<Wrap>(channel, req_wrap_obj);
14161416

1417-
node::Utf8Value name(env->isolate(), string);
1417+
node::Utf8Value utf8name(env->isolate(), string);
1418+
auto plain_name = utf8name.ToStringView();
1419+
std::string name = ada::idna::to_ascii(plain_name);
14181420
channel->ModifyActivityQueryCount(1);
1419-
int err = wrap->Send(*name);
1421+
int err = wrap->Send(name.c_str());
14201422
if (err) {
14211423
channel->ModifyActivityQueryCount(-1);
14221424
} else {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.