2 ms·
You can have processes listen on 0 - which means all available IPv4 IPs (available to that machine). And since you can have processes listen on 0, it means you
by laumars 11y ago
You can have processes listen on 0 - which means all available IPv4 IPs (available to that machine).
And since you can have processes listen on 0, it means you can equally curl 0; just like you could with 127.0.0.1. Here's an example from my IRC server (the only process I run on 0):
$ curl https://0:9997 -kis | head
HTTP/1.1 200 OK
Date: Fri, 12 Feb 2016 07:49:24 GMT
Server: ZNC - http://znc.in
Content-Length: 1878
Content-Type: text/html
Set-Cookie: 9997-SessionId=54245f15ba592bc691e09ac75e6778e6d4c33841fad71a8d6c56addc998e043f; path=/;
Connection: Close
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
(just in case someone queries, 0 is just another notation of 0.0.0.0)