add pid/eid/gid

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-05-10 14:41:14 +00:00
parent 3f1df57558
commit 0e0af9afa5
2 changed files with 7 additions and 3 deletions

View File

@ -16,11 +16,15 @@ class Server
@cq\wrap -> @cq\wrap ->
with conn with conn
_, ip = \peername! _, ip = \peername!
pid, uid, gid = \peerpid!, \peereid!
request = \read "*l" request = \read "*l"
\shutdown "r" \shutdown "r"
u = url.parse request u = url.parse request
ctx = ctx =
:ip :ip
:pid
:uid
:gid
host: u.host host: u.host
path: u.path path: u.path
query: u.query query: u.query

View File

@ -13,9 +13,9 @@ class ProxyRequestRefusedHandler
with gemini.Server ProxyRequestRefusedHandler! with gemini.Server ProxyRequestRefusedHandler!
\listen socket.listen "127.0.0.1", "58816" \listen socket.listen "127.0.0.1", "58816"
-- \listen socket.listen \listen socket.listen
-- path: "./var/mipha.sock" path: "./var/mipha.sock"
-- unlink: true unlink: true
\attach cq \attach cq
assert cq\loop! assert cq\loop!