Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F27239790
url parsing in nodejs with no scheme
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
BBlack
Nov 16 2018, 1:53 PM
2018-11-16 13:53:11 (UTC+0)
Size
494 B
Referenced Files
None
Subscribers
None
url parsing in nodejs with no scheme
View Options
request library ends up passing whatever's in the HTTPS_PROXY env var to url.parse(), and thus:
$ nodejs -e "require('url'); console.log(url.parse('208.80.154.22:8080'))"
Url {
protocol: '208.80.154.22:',
slashes: null,
auth: null,
host: '8080',
port: null,
hostname: '8080',
hash: null,
search: null,
query: null,
pathname: null,
path: null,
href: '208.80.154.22:8080' }
And then the decimal integer "8080", interpreted as a 32-bit integer IP, would be 0.0.31.144 ...
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6702221
Default Alt Text
url parsing in nodejs with no scheme (494 B)
Attached To
Mode
P7816 url parsing in nodejs with no scheme
Attached
Detach File
Event Timeline
Log In to Comment