echo "limit maxfiles 1024 unlimited" | sudo tee -a /etc/launchd.conf
git clone https://github.com/mholt/caddy.git
cd caddy
echo "test" > test.html
go run main.go
π
curl -v :2015/test.html
* Trying ::1...
* Connected to (::1) port 2015 (#0)
> GET /test.html HTTP/1.1
> Host: :2015
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 5
< Content-Type: text/html; charset=utf-8
< Last-Modified: Thu, 03 Sep 2015 16:48:52 GMT
< Server: Caddy
< Date: Thu, 03 Sep 2015 16:49:04 GMT
<
test
* Connection #0 to host left intact
βΏ
curl --http2 -v :2015/test.html
curl: (1) Unsupported protocol
π
brew install curl --with-nghttp2
π
curl --http2 -v :2015/test.html [2:01:54]
* Trying ::1...
* Connected to (::1) port 2015 (#0)
> GET /test.html HTTP/1.1
> Host: :2015
> User-Agent: curl/7.44.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAAQAAP__
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 5
< Content-Type: text/html; charset=utf-8
< Last-Modified: Thu, 03 Sep 2015 16:48:52 GMT
< Server: Caddy
< Date: Thu, 03 Sep 2015 18:02:05 GMT
<
test
* Connection #0 to host left intact