Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Feb 2019 14:20:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 235579] www/node 11.6 simple parse of url fails
Message-ID:  <bug-235579-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235579

            Bug ID: 235579
           Summary: www/node 11.6 simple parse of url fails
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bhughes@freebsd.org
          Reporter: rick@perftech.com
             Flags: maintainer-feedback?(bhughes@freebsd.org)
          Assignee: bhughes@freebsd.org

# node -p 'require("url").parse("https://www.test.com/test")'; node --versi=
on
url.js:385
this.hostname =3D toASCII(this.hostname, true);
^

Error: Cannot convert name to ASCII
at Url.parse (url.js:385:23)
at Object.urlParse [as parse] (url.js:149:13)
at [eval]:1:16
at Script.runInThisContext (vm.js:123:20)
at Object.runInThisContext (vm.js:312:38)
at Object. ([eval]-wrapper:6:22)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at evalScript (internal/bootstrap/node.js:720:27)
at executeUserCode (internal/bootstrap/node.js:313:7)
at startExecution (internal/bootstrap/node.js:276:5)
v11.6.0

In stepping through the debugger, I now can see that toASCII doesn't seem t=
o be
getting resolved correctly and this is causing it to fail. The definition on
line 24 or url.js is as follows:

`const { toASCII } =3D internalBinding('config').hasIntl ? internalBinding(=
'icu')
: require('punycode');`

internalBinding('config').hasIntl is undefined so it is trying to destruct =
to
punycode but that seems to be where the failure is occurring as 'toASCII' is
defined as =C6=92 toASCII() { [native code] }. I see that punycode has been
deprecated so not sure if that is the issue.

Likewise when I change my code to `new URL("https://www.test.com/test")`, it
fails on the call to 'parse' on line 319 of internal/url.js. 'parse' is def=
ined
as =C6=92 parse() { [native code] } and that throws the error there.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235579-7788>