Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 325441a

Browse filesBrowse files
lemireRafaelGSS
authored andcommitted
src: add missing to_ascii method in dns queries
PR-URL: #48354 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 1398829 commit 325441a
Copy full SHA for 325441a

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.